Custom RuntimeSchema for scalar types

29 views
Skip to first unread message

Vincenzo Pandolfo

unread,
Aug 28, 2017, 9:47:24 AM8/28/17
to protostuff
Hello,

I am using protostuff-runtime to serialize objects defined by users in protocol buffer format in a way that is compatible with protobuf-net (C# protocol buffer library).

I have defined a Schema for `BigDecimal` that (de)serializes BigDecimals in the desired format and registered it as a RuntimeSchema at application startup. This works with other types, so I am positive I'm registering it correctly.

However, when (de)serializing an object containing a BigDecimal, the schema defined in `RuntimeUnsafeFieldFactory` is used instead of this one. 

Is there a way to override the schema defined in the FieldFactory so that protostuff-runtime will use my custom schema?


Thanks,
Vincenzo

David Yu

unread,
Aug 28, 2017, 9:48:46 AM8/28/17
to protostuff


Thanks,
Vincenzo

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



--
When the cat is away, the mouse is alone.
dyuproject.com
Reply all
Reply to author
Forward
0 new messages