Camel JSON Endpoint?
Issue
How to expose my data from csv file to web JSON driven client?
I think I need 2 routes:
from("file").unmarshal().csv()from("jetty").unmarshal().json(JsonLibrary.Gson)
Is there better way to expose csv?
How do I chain those 2 routes? Should I add Singleton myBean that would keep list of rows as result of my route #1, to be able use it for reply for Jetty in route #2
There is Jettison, but I'm not aware how to use it in Camel.
Is Jettison better over Jetty endpoint?
I don't want to read CSV for every jetty / http request, but load the csv in memory and let jetty route to read from that memory?
Additionally, if the CSV large - how to do it via stream? to not do processing for whole content.
Environment
Fuse ESB Enterprise 7.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.