IssueRaiser

Manually marshalling/unmarshalling JSON has been a pain point for me on recent projects.

Manually marshalling/unmarshalling JSON has been a pain point for me on recent projects. I took a quick look at Protocol buffers just now and instantly understood how that will solve most of my issues with JSON. I define a simple message format (.proto) and generate native classes. My service methods can use the generated classes as parameters. The only thing missing for me was native support for JS (but I quickly found 3rd party libraries). I don't quite understand how transit, since it's schema-less, addresses that problem. From transit-java docs: Object data = reader.read(); I might be missing something, but it seems I have to manually create the native classes on both endpoints and cast to those classes. Either that or I still have to manually extract values using the reader API.

Posted by nogridbag on Jul 23, 2014, 4:20 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.9,500 issues0 comments

support (Other)

Manually marshalling/unmarshalling JSON has been a pain point for me on recent projects.

nogridbagJul 23, 2014, 4:20 PM

Manually marshalling/unmarshalling JSON has been a pain point for me on recent projects. I took a quick look at Protocol buffers just now and instantly understood how that will solve most of my issues with JSON. I define a simple message format (.proto) and generate native classes. My service methods can use the generated classes as parameters. The only thing missing for me was native support for JS (but I quickly found 3rd party libraries). I don't quite understand how transit, since it's schema-less, addresses that problem. From transit-java docs: Object data = reader.read(); I might be missing something, but it seems I have to manually create the native classes on both endpoints and cast to those classes. Either that or I still have to manually extract values using the reader API.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue