Code Monkey home page Code Monkey logo

Comments (4)

maxime-esa avatar maxime-esa commented on August 16, 2024

There are no JSON standard encoding rules for ASN.1 so this is not possible.

You may look at the ASN.1 Generic String Encoding Rules instead, which are fairly easy to implement, and compliant to the ASN.1 semantics.

But we are not going to add native GSER encoding in the core of ASN1SCC in the near future as we can't really afford to support too many encoding runtimes, especially when they do not target safety-critical systems that need compact binary encodings.

The options if you want to implement this kind of encodings are the following:

  1. use the ASN1SCC Python API from TASTE Data Modelling tools to get access to the ASN.1 types. The Python API already provides a GSER() function that encodes in that format... We also already have a basic parser in Python for that format in TASTE.

  2. Encode in XER and convert to JSON. I am pretty sure there exists XML to JSON converters...

  3. Also in the DMT tools (see point 1 above) there is an ASN.1 to SQLAlchemy bridge, so you can store ASN.1 values in a SQL Database which structure is compliant to the ASN.1 AST. From this point you can easily interface with JSON.

from asn1scc.

vgheo avatar vgheo commented on August 16, 2024

@maxime-esa - thank you for the valuable information.

In our current context, any ASN1-JSON encoding would be acceptable - even though ideally it should be an international standard.

There is a proprietary specification by OSSNokalva.
It is unclear what the legal terms of use are for this specification.

Related : diagram of asn1scc architecture

from asn1scc.

vgheo avatar vgheo commented on August 16, 2024

Regarding the maintenance of the JSON encoding runtime - this would amount to the selection of one of the many JSON encoding/decoding implementations.

IMO - this means that almost no maintenance is involved : the only maintenance required it to keep the code generator compatible with the API/datamodel of the selected JSON library (which is expected to be quite stable).

from asn1scc.

maxime-esa avatar maxime-esa commented on August 16, 2024

Understood .. Thanks for letting us know if you develop this runtime, you may commit it under the contrib folder and I'll check with the team if it can be merged with the core tool.

from asn1scc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.