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

Discuss impact of 'compactArrays' in JsonLD #125

Closed
matgnt opened this issue Jun 27, 2023 · 3 comments · Fixed by #139
Closed

Discuss impact of 'compactArrays' in JsonLD #125

matgnt opened this issue Jun 27, 2023 · 3 comments · Fixed by #139
Labels
help wanted Extra attention is needed

Comments

@matgnt
Copy link
Collaborator

matgnt commented Jun 27, 2023

I learned arrays with only 1 element can automatically be processed by the jsonld libs into single objects.
jsonld:
https://www.w3.org/TR/json-ld-api/#the-jsonldoptions-type

Also discussed in EDC here:
eclipse-edc/Connector#3232
and answered there:
eclipse-edc/Connector#3137 (comment)

This is also relevant for what we discussed here already regarding policy property:
#76

Questions are:

  • is this desired behavior?
  • what is the effect on provided schemas?

--
Matthias Binzer

@matgnt
Copy link
Collaborator Author

matgnt commented Jun 29, 2023

Decision in the meeting today:

  • jsonld serialization in compact form, with compactArrays=False (meaning, arrays are arrays also with only a single element)
    https://www.w3.org/TR/json-ld-api/#the-jsonldoptions-type
  • required profiling jsonld, needs to be a separate section
  • also move other profile things (odrl target, etc) into this new profile section (which is in catalog right now)

Also note:

  • a property that has not a value it is not included in the message (MUST). empty array means no value, means not included.

@ssteinbuss ssteinbuss added the help wanted Extra attention is needed label Jul 6, 2023
@sebbader-sap
Copy link
Contributor

sebbader-sap commented Jul 6, 2023

(Comment moved to #132)

@matgnt
Copy link
Collaborator Author

matgnt commented Jul 18, 2023

Just because I did some tests with the timestamps, I also tested compactArray with main python library pyld (2.0.3). Unfortunately it seems there is a 5 years old bug in it - not a good indication regarding quality of the library, but anyway, seems there is a problem. It can be worked around, but just to collect library compatibility issues here with profiling ideas.
Reference: digitalbazaar/pyld#61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
3 participants