Access to serializer/deserializer? #1060
-
Hi, I'd like to use the langium as a serializer/deserializer for my semantic model , more specifically my GLSP semantic model. Is there a (simple) way to access the langium serializer/deserializer "backend" programatically? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hey @PatrikN-work, you should be able to use the |
Beta Was this translation helpful? Give feedback.
-
Thanks for a quick anwer! Sorry, I wasn't clear in my question. I want to serialize according to my Langium grammar not in json format (which I interpert that the JsonSeralizer does). |
Beta Was this translation helpful? Give feedback.
-
Great, thanks. I'll give it a try. And please prioritize the serializer as well :-) |
Beta Was this translation helpful? Give feedback.
Yes, you can just call the
LangiumParser
service of your language container:https://github.com/langium/langium/blob/915ff5d53daf76415b0a838540c90e3437d3f8d0/packages/langium/src/parser/langium-parser.ts#L152-L164