News for hackers. Stuff that matters.
Re:Show HN: JSONSchema to TypeScript compiler by akst on Wednesday April 26, 2017 @07:11AM (#14202075)
You can probably encode a directed graph by storing the nodes as values in a dictionary which track which nodes they point too, and the keys of the dictionary would be the node identifiers. If you represent it a specific way in your program, just perform a normalisation phase after decoding, and vice versa for encoding.
Re:Show HN: JSONSchema to TypeScript compiler by lolive on Wednesday April 26, 2017 @08:38AM (#14202428)
As far as I understand, this is the way RDF works. I use N3.js and it basically does that. Is it a need that usually appears when you send JSON between server and client?
Re:Show HN: JSONSchema to TypeScript compiler by akst on Thursday April 27, 2017 @11:12PM (#14216634)
Not sure what the requirements are for the parent comment, I'm just explaining an approach to serialise a graph data structure.