Changes between Version 61 and Version 62 of pyson
- Timestamp:
- 10/27/22 10:44:41 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pyson
v61 v62 90 90 91 91 === {{{@JsonValue}}} 92 indicates that the value of annotated accessor 93 (either field or "getter" method [a method with non-void return type, 94 no args]) is to be used as the single value to serialize for the 92 indicates that the value of annotated getter method 93 is to be used as the single value to serialize for the 95 94 instance, instead of the usual method of collecting properties 96 95 of value. 96 Note that in python you can only create what you would call "java class fields" 97 in the constructor, like this 98 {{{ 99 class X: 100 def __init__(self,..): 101 self._x = initialvalue 102 }}} 103 104 Therefore the jackson alternative of annotating a field with @JsonValue makes no sense in python. 105 97 106 98 107