-
Notifications
You must be signed in to change notification settings - Fork 28
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
Document the fact that DH JSON is a bare list and not compatible with LinkML tools as is #390
Comments
Looking back on this, I think DH should input/output LinkML (JSON-LD) native JSON directly via browser, so need to understand the javascript required to do so. The existing "file -> Save as > .json" could be renamed to "file -> Save as > flat .json", and we could add a "file -> Save as > LinkML .json" option for the pure version. This avoids us having to use command line python tools as intermediary step. @pkalita-lbl for comment. (The LinkML data inlining options will come into play here later when we add 1-many data relations.) |
Let me see if I understand Mark's concern correctly. If I have a schema that implement's the typical LinkML container object pattern: id: http://example.org/test
name: test
imports:
- linkml:types
prefixes:
linkml: https://w3id.org/linkml/
slots:
s1:
range: string
s2:
range: string
entries:
range: Entry
multivalued: true
classes:
Entry:
slots:
- s1
- s2
EntrySet:
tree_root: true
slots:
- entries I could point DataHarmonizer to the [
{
"s1": "row 1 col 1",
"s2": "row 1 col 2",
},
{
"s1": "row 2 col 1",
"s2": "row 2 col 2",
}
] The issue is that I can't validate that file as-is using So what Mark is saying is that if DataHarmonizer could somehow produce JSON that instead looks like: {
"entries": [
{
"s1": "row 1 col 1",
"s2": "row 1 col 2",
},
{
"s1": "row 2 col 1",
"s2": "row 2 col 2",
}
]
} Now we have an object at the root level. That object corresponds to the I don't have an exact proposal for how to resolve the situation, but it will probably involve a combination of logic to guess at the so-called container class and index slot (presumably via teaching DataHarmonizer to understand the |
DH is welcome to add the DH JSON -> LinkML JSON (and vice versa) converters that I wrote
see
The text was updated successfully, but these errors were encountered: