vlm / asn1c

The ASN.1 Compiler
http://lionet.info/asn1c/
BSD 2-Clause "Simplified" License
1.03k stars 553 forks source link

Support data exchange with JSON #98

Open nprobert opened 8 years ago

nprobert commented 8 years ago

Besides XML, also support JSON input/output files.

davidchappelle commented 7 years ago

Anyone have an idea of where to start here? Would be really nice not ot be handcuffed to OSS Nokalva for JSON suport.

nprobert commented 7 years ago

Might have to go through XML as an intermediate format.

On 5/3/2017 4:07 PM, Dave Chappelle wrote:

Anyone have an idea of where to start here? Would be really nice not ot be handcuffed to OSS Nokalva for JSON suport.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vlm/asn1c/issues/98#issuecomment-299020546, or mute the thread https://github.com/notifications/unsubscribe-auth/AI60I78zx-wTKzrqaF-bfzb_IMC1RUCuks5r2N6dgaJpZM4I7HXI.

velichkov commented 7 years ago

Hi @davidchappelle

Going through the XML (XER encoding) as an intermediate format is possible but a better solution is to implement encode/decode directly to JSON.

Have a look how XER (xml) has been implemented in skeletons/xer_encoder.[ch] , skeletons/xer_decoder.[ch] and the various <TYPE>_encode_xer, <TYPE>_decode_xer functions for the built-in types.

hmusavi commented 6 years ago

Is this something we are considering to add as a new feature. We are currently going through XER encoding as an intermediate format and running through issues particularly with respect to the size of messages and the lack of native support for arrays in XML spec. What would you suppose be the level of effort for adding JSON support to asn1c?

vlm commented 6 years ago

@hmusavi, please contact me offline.

miroslav-beranic commented 6 years ago

Hi. Is there any update on this one?

Kind Regards, Miroslav

nprobert commented 5 years ago

Not an absolute must have, but nice to have. One can get an XML to JSON converter out there for free.

nprobert commented 5 years ago

Here is the document from OSS that describes the use of JSON called JER. OSS-Triglia-JER.pdf