Override to provide custom field naming.
Override to provide custom field naming. Caching is recommended for performance.
Given the JsObject
for the sealed family, disambiguate and
extract the JsObject
associated to the Name
implementation
(if available) or otherwise return None
.
Given the JsObject
for the sealed family, disambiguate and
extract the JsObject
associated to the Name
implementation
(if available) or otherwise return None
.
Given the JsObject
for the contained product type of Name
,
encode disambiguation information for later retrieval.
Given the JsObject
for the contained product type of Name
,
encode disambiguation information for later retrieval.
Product types are disambiguated by a
{"key":"value",...}
. Of course, this will fail if the product type has a field with the same name as the key. The default key is the word "type" which is a keyword in Scala so unlikely to collide with too many case classes.This variant is most common in JSON serialisation schemes and well supported by other frameworks.