Changes between Version 77 and Version 78 of pyson
- Timestamp:
- 06/05/24 13:58:11 (11 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pyson
v77 v78 105 105 Indicates that that other class is a sub-class of the annotated class. The other class can be used for deserialization as well. 106 106 107 If this is used, the @JsonTypeInfo must also be provided. 107 If this is used, the @JsonTypeInfo must also be provided. If you do not specify @JsonTypeInfo, then the default is used which means the type info is not attached to the serialized format, causing deserialization to fail. 108 109 Example: {{{@JsonSubTypes(['A','B'])}}} attached to class C 110 indicates that class A and B are subclasses of C. 111 112 108 113 109 114 === {{{@JsonValue}}} … … 146 151 147 152 At this moment WRAPPER_OBJECT should be used; the others are not properly implemented. 153 154 155 example: 156 {{{@JsonTypeInfo(use=Id.NAME, include=As.WRAPPER_OBJECT)}}} added to class C indicates that all fields in C will be wrapped inside a wrapper object (a json dict), and that the key of the dict will be the (short) NAME of the class. The de-serializer will use that directly to use the indicated class for deserialization of the json 148 157 149 158 === {{{@JsonDeserialize}}}