jangko / msgpack4nim

MessagePack serializer/deserializer implementation for Nim / msgpack.org[Nim]
http://msgpack.org/
119 stars 21 forks source link

[Question] Reading from a file #50

Closed mantielero closed 4 years ago

mantielero commented 4 years ago

I have some data stored as msgpack file in python. The file contains more than 250columns.

In order to read the file, do I need to create a type that holds the data? Is there a workaround for that? I mean, something that creates that type definition from the file structure.

jangko commented 4 years ago
var s = newFileStream("somefile.m", fmRead)
var x = s.toAny()

it will create a dynamic msgpack structure in memory. then use msgpack2any API to interrogate the content as you wish.

jangko commented 4 years ago

something that creates that type definition from the file structure

code generation? no