I have a camel route that takes a String object of json, calls a bean to strip out a JSONArray of players.
from("direct:players").routeId("player_route")
.bean(BootstrapStaticParser.class,"getPlayersList")
.split(body())
.to("direct:aws");
However after I call:
.split(body())
What should be a json string justs into a LinkedHashMap but I require to maintain the json format to insert the data into AWS DDB.
Logging to show the issue
Before
Exchange[ExchangePattern: InOnly, BodyType: net.minidev.json.JSONArray, Body: [{"id":1,"photo":"48844.jpg","web_name":"Player1","team_code":3},{"id":2,"photo":"11334.jpg","web_name":"Player2","team_code":3},{"id":3,"photo":"98980.jpg","web_name":"Player3","team_code":3},{"id":4,"photo":"51507.jpg","web_name":"Player4","team_code":3},...]
After
Exchange[ExchangePattern: InOnly, BodyType: java.util.LinkedHashMap, Body: {id=1, photo=48844.jpg, player=Player1, team_code=3}]
Any help would be appreciated.