Changes between Version 36 and Version 37 of pyson
- Timestamp:
- 05/26/21 10:20:48 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pyson
v36 v37 43 43 === Serialization 44 44 Serialization of an object is much more straightforward. 45 * Create a json dict, with keys the arguments of the __init__function of the object and the value the serialized value returned by the getter (also considering @JsonGetter)45 * Create a json dict, with keys the arguments of the {{{__init__}}} function of the object and the value the serialized value returned by the getter (also considering @JsonGetter) 46 46 * If the object is an instance of a class with @JsonSubtypes, add/wrap the json with class info according to the @JsonTypeInfo 47 48 === Primitive types 49 Primitive types are types that are built into Python and do not have the {{{__init__}}} function as we expect, for instance float, str. Therefore these need to be intercepted and handled through special constructors and serializers. 50 51 The following primitives are recognised and handled separately: 52 53 int, float, bool, str, complex, range, bytes, bytearray, datetime, URI, Decimal, dict, list 54 55 The dict and list are treated even more special as we also support the List[TYPE] and Dict[KEYTYPE, VALUETYPE] types. 56 47 57 48 58 == Annotations