JSON Schema or Langium #544
Replies: 3 comments 1 reply
-
Hi @paulfrench, If you're happy with an existing language, there's actually little need for Langium or any other language workbench for that matter. While Langium offers a bit more granularity and feature support (such as cross references), being able to reuse existing tooling for a language is usually preferred. In the same vein, you probably wouldn't try to reimplement JavaScript in Langium, but use an existing JavaScript parser/editor instead, wouldn't you? @spoenemann Your opinion on that? |
Beta Was this translation helpful? Give feedback.
-
Thanks @msujew, what I mean is if I have a need to create some form of grammar/specification for a specific domain area from which I will code generate for, unless my grammar is fairly complex am I not better to use JSON and JSON schema (or for argument sake xml and xml schema)? Visual tooling for JSON or XML editing with schema enforcement are common, and with a little meta-data, can be made to look very nice using icons etc. JSON schema via $data does allow the enforcement of cross references to actual data entered, I believe it is limited to certain parts of the JSON schema though. So it was just your thoughts really? I'm starting to think JSON and JSON schema is a good candidate to code gen from for fairly simplistic definitions and maybe Langium for more complex specifications(grammar). I have a requirement coming down the road where a web visual build tool to create these specifications is required and so not sure what to do. I really like Langium but I believe it has the ability to display a specification based on a grammar visually but there is no plans to allow building visually. I appreciate your thoughts? |
Beta Was this translation helpful? Give feedback.
-
If you're happy with key-value mappings and arrays, JSON is perfect. There are several reasons to use a DSL (and thus Langium) instead, here are a few that come to my mind:
|
Beta Was this translation helpful? Give feedback.
-
If I'm happy with the JSON syntax and happy to specify a JSON schema to enforce data entry what advantages would I get from using Langium ?? There is plenty of editors to create JSON data based on JSON schema. I could code generate from this JSON data.
What extra power would Langium give me apart from creating your own specific DSL ?
I'm being asked some questions and now I'm not so sure.
Cheers
Beta Was this translation helpful? Give feedback.
All reactions