Code Monkey home page Code Monkey logo

Comments (4)

igordejanovic avatar igordejanovic commented on May 19, 2024

I'm not aware of any project using textX for JSON Schema implementation.
It shouldn't be hard to define grammar for JSON Schema in textX. You can start with JSON example.
Actually, JSON schema is JSON file so it can be parsed with any JSON parser (even textX JSON example) and validated and analysed afterwards. You could then extract schema validation rules and apply them to subsequent JSON files. JSON schema is meta-language, thus it could be applied to itself.

But, if you want standard JSON Schema implementation there are solution for Python that do that well and probably will parse much faster than textX. textX is perfect for situation where you want to parse something that doesn't have readily available parser, like some custom textual formats or DSLs.
Is there any specific reason not to use existing JSON Schema libs?

from textx.

chris-hailstorm avatar chris-hailstorm commented on May 19, 2024

from textx.

igordejanovic avatar igordejanovic commented on May 19, 2024

Sounds interesting. Give it a try if you wish and post here if you get stuck along the way.
I'll be happy to help.

from textx.

goto40 avatar goto40 commented on May 19, 2024

You can easily reference an arbitrary non textX object (e. g., from a json model) from a textX model. Maybe have a look at https://github.com/igordejanovic/textX/blob/master/tests/functional/test_scoping/test_reference_to_nontextx_attribute.py

from textx.

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.