API to convert POJO to binary

136 views
Skip to first unread message

Jayant Ameta

unread,
Mar 15, 2018, 7:41:26 AM3/15/18
to FlatBuffers
I have a few nested java objects and the flatbuffers schema files (and hence the generated classes). I want to convert the object to flatbuffers binary. 
Is there a library or an API which can do that by looking at the schema. Instead of writing the mapper for each java object to convert to it's corresponding Builder.

e.g. TestMonster class
class TestMonster{
 
String name;
}



Instead of explicitly calling: 
Monster.addName(builder, testMonster.getName())

Is there a library which can map TestMonster to Monster since the schema is already present?

Wouter van Oortmerssen

unread,
Mar 15, 2018, 3:29:08 PM3/15/18
to Jayant Ameta, FlatBuffers
C++ has an "object API" that does this, and Oli Wilkinson (https://github.com/evolutional) was at some point working on porting that to Java & C# too, but I don't think he ever finished.

--
You received this message because you are subscribed to the Google Groups "FlatBuffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages