• Eric Myhre's avatar
    Wiring JSON and CBOR to multicodec in repose! Yas! · 749cf35c
    Eric Myhre authored
    Finally.
    
    This is "easy" now that we've got all the generic marshalling
    implemented over Node and unmarshalling onto NodeBuilder:
    we just glue those pieces together with the JSON and CBOR
    parsers and emitters of refmt, and we're off.
    
    These methods in the repose package further conform this to
    byte-wise reader and writer interfaces so we can squeeze them
    into Multicodec{En|De}codeTable... and thence feed them
    into ComposeLink{Loader|Builder} and USE them!
    
    And by use them, I mean not just use them, but use them transparently
    and without a fuss, even from the very high level Traverse and
    Transform methods, which let users manipulate Nodes and NodeBuilders
    with *no idea* of all the details of serialization down here.
    
    Which is awesome.
    
    (Okay, there's a few more todo entries to sort out in the link
    handling stuff.  Probably several.)
    
    But this should about wrap it up with encoding stuff!  I'm going
    to celebrate with a branch merge, and consider the main topic to
    be lifted back up to the Traverse stuff and how to integrate
    cleanly with link loaders and link builders.
    Signed-off-by: default avatarEric Myhre <hash@exultant.us>
    749cf35c
multicodecBuiltinJson.go 836 Bytes