-
Notifications
You must be signed in to change notification settings - Fork 78
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Existing DSL for JSON Schema? #51
Comments
I'm not aware of any project using textX for JSON Schema implementation. 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. |
I use other JSON schema tools and they do work well.
However there are some domains that could be expressed better with a
combination of standard JSON schema and custom textx objects -- I was
hoping to combine the two.
Thanks
…On Wed, Jan 3, 2018 at 9:43 AM, Igor Dejanović ***@***.***> wrote:
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
<https://github.com/igordejanovic/textX/tree/master/examples/json>.
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?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABYwtOXuq2zJyWeo8X1aI6KS1f5Z6uHwks5tG5IKgaJpZM4RRCYp>
.
|
Sounds interesting. Give it a try if you wish and post here if you get stuck along the way. |
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 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Textx is an outstanding tool, thank you.
Is anyone aware of a JSON Schema implementation in Textx?
The text was updated successfully, but these errors were encountered: