I am going trough the circe documentation and can't figure out how to handle the following.
I would simply like to add a field with an object in said the main JSON object.
{
Fieldalreadythere: {}
"Newfield" : {}
}
I just want to add the Newfield
in the object. To give a bit of context I am dealing with Json-ld. I just want to add a context object. @context: {}
See example below:
{
"@context": {
"@version": 1.1,
"xsd": "http://www.w3.org/2001/XMLSchema#",
"foaf": "http://xmlns.com/foaf/0.1/",
"foaf:homepage": { "@type": "@id" },
"picture": { "@id": "foaf:depiction", "@type": "@id" }
},
"@id": "http://me.markus-lanthaler.com/",
"@type": "foaf:Person",
"foaf:name": "Markus Lanthaler",
"foaf:homepage": "http://www.markus-lanthaler.com/",
"picture": "http://twitter.com/account/profile_image/markuslanthaler"
}
I would like to add the context object, that's all.
How can I do that with circe. The example in the official documentation mostly talk about modifying the value, but nothing to actually add field and so on.