Closed ViktorHaag closed 9 years ago
Hmmm... I don't say no, but let me first dive into JSON-LD more and think about it :)
That's quite fair. Thanks.
Well, I've looked a bit into it, so definitely json-ld
is something worth implementing, yet still wonder about some technical stuff, like:
json-ld
should be extension of this model, or maybe another, different model?Anyway generating names with @
shouldn't be a big problem, stay tuned, I will give you more details about this soon.
@ViktorAtD2L - see this ticket -> #53
Is it feasible to add a simple level of compatibility for JSON-LD linked data fields, without diving into the JSON-LD spec (i.e. just treat the fields as standard JSON fields, but with some recognition of their special names and formats).
I'm thinking maybe a "LinkedDataField" that derives from BaseField that starts with the standard var name in Python, and then appends/transforms the JSON-LD decorators as appropriate:
'id' = '' in Python that's a LinkedDataField becomes '@id' in the JSON serialized form?
or 'ld_at_id' in Python becomes '@id'?
This might be very convenient, but shouldn't necessarily mistaken for "full support for JSON-LD"...
Does this seem like a good idea? Or would you rather "support JSON-LD 'the right way' or not at all"?
I could probably see my way to adding a pull request for adding simple field name transformation, with maybe a little guidance, but only if you think it's a reasonable approach to take.