typescript-generator icon indicating copy to clipboard operation
typescript-generator copied to clipboard

PLEASE VOTE: Which JSON library do you use?

Open vojtechhabarta opened this issue 5 years ago • 11 comments

Vote using 👍 (mark all libraries that you want to use with typescript-generator)

vojtechhabarta avatar Sep 03 '18 16:09 vojtechhabarta

Jackson 2

vojtechhabarta avatar Sep 03 '18 16:09 vojtechhabarta

Jackson 1

vojtechhabarta avatar Sep 03 '18 16:09 vojtechhabarta

JAXB

vojtechhabarta avatar Sep 03 '18 16:09 vojtechhabarta

GSON

vojtechhabarta avatar Sep 03 '18 16:09 vojtechhabarta

Other public library

(please comment)

vojtechhabarta avatar Sep 03 '18 16:09 vojtechhabarta

Some private library

vojtechhabarta avatar Sep 03 '18 16:09 vojtechhabarta

The thing is... it depends.

For small objects, GSON is better. For big objects trees, Jackson2 is better.

REST services is usually small to medium objects so GSON is a better choice.

Rouche avatar Sep 03 '18 16:09 Rouche

@Rouche you can select more than one option. (I just added note to original comment.)

vojtechhabarta avatar Sep 03 '18 16:09 vojtechhabarta

@vojtechhabarta Another thing to note that goes along with my request about Spring. You would not need any implementations Java side. As the serialization is all taken care of with spring. Depending on the dependency you have, Jackson2 or GSON is resolved from classpath.

All of this with one annotation. @ResponseBody

I need to finish generation part this week. Hoping all goes well.

Rouche avatar Sep 03 '18 23:09 Rouche

@vojtechhabarta please add Yasson/JSONB to libraries

mxmind avatar May 21 '19 09:05 mxmind

@vojtechhabarta if you need some help to add Yasson-related features, I could help you. My team already implemented a lot to support this library. And of course, we can create a PR to add an ability to generate REST clients based on fetch API.

mxmind avatar May 21 '19 09:05 mxmind