2021年1月7日星期四

Transform the DB data JSON dynamically without creating a huge number of Pojos [closed]

I have a huge Json Response to be constructed and to enrich it I am fetching the data from SQL server. Now the issue is that I don't want to create a huge number of POJOs as per JSON schema and use mappers to set the data into it. What I am looking for is somehow to create the JSON dynamically. For an eg. I can keep the required output JSON in some configuration file with the corresponding data mapping of it and use some library to transform this configuration map into the JSON response.

Is it doable in java ?? I have similar code that can achieve this in NODE JS, but I need to implement it in java. Please share your thoughts on it. I am creating Rest API and using java and spring boot for that.

https://stackoverflow.com/questions/65598283/transform-the-db-data-json-dynamically-without-creating-a-huge-number-of-pojos January 06, 2021 at 11:07PM

没有评论:

发表评论