json-ld icon indicating copy to clipboard operation
json-ld copied to clipboard

Place `@context` entry on top.

Open timothee-haudebourg opened this issue 5 years ago • 0 comments

Because of a limitation of the json crate, the compaction algorithm can only attach the @context entry at the bottom of the generated json object. I see two solutions for this:

  • Add a compact_in function that would compact a document inside a prepared json object, with the context already attached on top.
  • Wait for maciejhirsz/json-rust#194 to be fixed, if it is someday.

timothee-haudebourg avatar Dec 23 '20 13:12 timothee-haudebourg