Skip to content
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

Remove JSON standard Primitive Datatype #277

Open
enikao opened this issue May 25, 2024 · 8 comments
Open

Remove JSON standard Primitive Datatype #277

enikao opened this issue May 25, 2024 · 8 comments
Labels
2024.1 LionWeb release 2024.1 M3 serialization

Comments

@enikao
Copy link
Contributor

enikao commented May 25, 2024

We remove Primitive Datatype JSON from builtins library (#9).

Rationale: We add structured datatypes (#265). This should cover almost all use cases we envisioned JSON primitive datatype for.
The one remaining (weak) use case would be: We already have some JSON data in our domain, and want to store it in the model. JSON support in LionWeb would relieve this language from (de-)serializing that JSON data from/to the model. However, chances are we already have a JSON (de-)serializer if we're dealing with JSON data.

We explicitly don't guarantee compatibility between different LionWeb versions (#130).

As a side-effect, this also tests what happens if we make such changes to the spec.

@joswarmer
Copy link
Contributor

We loose one use case, where someone want to store untyped JSON data in a model. The StructuredDatatype needs to have all its fields explicitly defined in the language definitions, a JSON property does not.

@dslmeinte
Copy link
Contributor

We first label the JSON primitive type as deprecated in all implementations, then add support for the value types, and just before releasing 2024.1 we can remove JSON entirely.

@enikao
Copy link
Contributor Author

enikao commented Jun 13, 2024

Do we really want to add a Deprecated Annotation to the M3 element?

  • Where would the definition of that annotation be hosted?
  • This forces all implementations to support annotations on language elements. Implementing this is not trivial: Most implementations have special handling for (de)serializing languages/M2, which then needs to be intermixed with M1 (de)serialization for handling annotations. We generally have references from annotations to language elements, or want to (de)serialize the language defining an annotation at the same time as the language using the annotation.

@dslmeinte
Copy link
Contributor

Would it be work to define the Deprecated Annotation as part of LionCore (version "2024.1") itself?

@enikao
Copy link
Contributor Author

enikao commented Jun 14, 2024

Would it be work to define the Deprecated Annotation as part of LionCore (version "2024.1") itself?

We could. The question is whether we want. To me it feels like the wrong place. You cannot sensibly use LW without String, Node, etc. However, you don't need to know about deprecation to use LW.

@dslmeinte
Copy link
Contributor

dslmeinte commented Jun 14, 2024

We could add the annotation to the builtins as well, but that doesn't solve the (de-)serialization of M2s-problem.

@enikao
Copy link
Contributor Author

enikao commented Jun 14, 2024

Oh sorry I misread your question, and answered it for builtins.

So we would allow an annotation to be used on the language that defines the annotation? Does not seem to simplify the implementation.

@dslmeinte
Copy link
Contributor

No, it doesn't... I guess we should just try to implement in all current reference implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2024.1 LionWeb release 2024.1 M3 serialization
Projects
None yet
Development

No branches or pull requests

3 participants