add support for (de)serialization of both implementations of IMetric
log the serialized text on assertion failure
enforce ordering of json properties
Merge pull request #285 from fourk/serdes_support_for_imetric

add support for (de)serialization of both implementations of IMetric