FWIW, I contribute to http://levelgraph.io/
A simple way to try it out is with this playground:
https://wileylabs.github.io/levelgraph-playground/
It puts everything into the levegraph hexastore, and then you can serialize it back out into JSON-LD or N3.
It's not unlike what you've done by combining two flattened representations--which could just as easily work with something equally as consistent-making. :)
Anyhow. Hope that's helpful!
Benjamin
--
http://bigbluehat.com/
http://linkedin.com/in/benjaminyoung
________________________________
From: Martynas Jusevičius <martynas@atomgraph.com>
Sent: Friday, July 13, 2018 7:58:37 AM
To: Angelo Veltens
Cc: public-linked-json@w3.org
Subject: Re: Merging JSON-LD graphs
I haven’t used it, but check rdfjs:
https://github.com/rdfjs
On Fri, 13 Jul 2018 at 13.56, Angelo Veltens <angelo.veltens@online.de<mailto:angelo.veltens@online.de>> wrote:
Am 13.07.2018 um 13:47 schrieb Martynas Jusevičius:
> I think you mean RDF graphs. We shouldn’t repeat the mistakes that
> were made with RDF/XML and conflate the model and the serialization(s).
Yes, you are right about that!
>
> If you read both graphs into an RDF dataset using library such as Jena
> or RDF4J or Python’s RDFLib, you can then re-serialize them into a
> single file (JSON-LD or other).
I am working with JavaScript at the moment. Any library recommendations
on that?
Best regards,
Angelo