Deserialize custom datatype documentation

hi all

I checked the helppatches in lib/vlCore the grey book but still had troubles deserializing my custom datatype. maybe a extra example in lib/vlcore would help others. Took me a long time to figure out that I had to split the xElement to get a spread of my elements.

Deserialize node works, but behaves in a strange way when connected directly to the xElement node. It was not clear to me that I had been working with the wrong datatype.

Unbenannt

i think you need the Root node of the XDocument, not its children elements…

When I use the data coming out of “XDocument” I am unable to pass it through a sink. And when connected directly to the Deserialize the node outputs a messed up object, changing every frame.

emitter

When I patch it as shown in the first picture it works correctly.

there is a node called Root (or RootElement) in the xml category, if i remember correctly.

but true, we should have a ready made node for load/save to file.

1 Like

but wait, this looks odd. can you share this patch with us?

certainly, here you go

VL.zip (37.6 KB)

in the gif above, the patch adds one spread dimension on every load/save, probably not what you want.

mkay…the patch you attached is not exactly the one that shows the weird flickering in the gif above, so i cannot reproduce that.

anyway de/serialization for this case should be as simple as:

grafik

note the XMLReader/Writer nodes are not the advanced ones that you used in your patch!

Thank you guys for the support!

@joreg
“xDocument → Deserialize → AddSpread” produces the flicker
I sent you the working one so please have a look at this patch if you want to investigate:

VVVV.Value.FI.vl (152.1 KB)

upcoming vl version has a handy node called Persistent. it can be used to read/write data in a patch to disc:
image

6 Likes

new alpha is up and this new node can be tested, among a few other new nodes, like tuples up to 8 items and quaternion to euler angles.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.