We started using DelegateClass on our codebase recently, and are experiencing some compatibility issues with Oj.
The main problem has already been reported here #477, but the proposed solution does not work for our use case.
We currently use this options on the dump method calls
options = {
create_additions: false,
mode: :compat,
time_format: :xmlschema,
second_precision: 0,
use_to_hash: true
}
but if we change it to compat, we have 2 problems:
time_format is not valid for that mode, so we can't keep this change transparent.
- Decimal numbers are getting serialized as strings. We thought this might be fixed by setting
compat_bigdecimal to false or true, but that did not work either.
How can we get delegate objects to serialize only the underlying object? And not the attributes of the delegate that are anecdotic?
For aditional context, Sequel uses Delegate classes in their implementation and this is causing our problems here: jeremyevans/sequel#2153
Thanks in advance,
Tomas.
We started using
DelegateClasson our codebase recently, and are experiencing some compatibility issues with Oj.The main problem has already been reported here #477, but the proposed solution does not work for our use case.
We currently use this options on the
dumpmethod callsbut if we change it to compat, we have 2 problems:
time_formatis not valid for that mode, so we can't keep this change transparent.compat_bigdecimalto false or true, but that did not work either.How can we get delegate objects to serialize only the underlying object? And not the attributes of the delegate that are anecdotic?
For aditional context, Sequel uses Delegate classes in their implementation and this is causing our problems here: jeremyevans/sequel#2153
Thanks in advance,
Tomas.