caused by the change in a21209385425c66cd7ae8f188f7f5b43005cd29d (reverted here). That change, however, was because we had quite a few improper serialization implementations that were not properly beginning an object for serialization. (This can often go unnoticed begin begin_object() is a no-op for binary serialization, but is crucial for json serialization).
To fix this, this PR:
reverts a21209385425c66cd7ae8f188f7f5b43005cd29d
Adds serialization support for serialize_object functions/methods instead of serialize_value: these work the same way as serialize_value, except that there is an implicit begin_object around the call so that the serialization code doesn't have to have its own begin_object().
Fixes various places that weren't properly doing a begin_object by switching most serialization functions to the new serialize_object
Finishes off the BEGIN_SERIALIZE/BEGIN_SERIALIZE_OBJECT/FIELD macros by expanding all the remaining ones and removing the macro definitions. Many of BEGIN_SERIALIZE() were actually wrong (the same way as in the previous point) and should have been BEGIN_SERIALIZE_OBJECT()'s instead (fixed here as well by changing them to serialize_objects).
This builds on top of #1716 -- only the last three commits are relevant to this PR.
This fixes an issue in 1716 where serialization of transactions was resulting in:
instead of:
caused by the change in a21209385425c66cd7ae8f188f7f5b43005cd29d (reverted here). That change, however, was because we had quite a few improper serialization implementations that were not properly beginning an object for serialization. (This can often go unnoticed begin
begin_object()
is a no-op for binary serialization, but is crucial for json serialization).To fix this, this PR:
serialize_object
functions/methods instead ofserialize_value
: these work the same way as serialize_value, except that there is an implicitbegin_object
around the call so that the serialization code doesn't have to have its own begin_object().begin_object
by switching most serialization functions to the newserialize_object
serialize_object
s).