-
v1, Beta 3 Pre-Release
released this
2024-06-29 15:53:39 +00:00 | 17 commits to main since this releaseThis release implement support for pjson-decorated classes. If the class has a
toJson
instance method, it will be used to serialize the JSON instead ofjson_encode
, and if the class has afromJsonString
static method, it will be used to deserialize the JSON instead ofjson_decode
andJsonMapper::map
. (Both of these are provided by theJsonSerialize
trait provided in the pjson project.)The conditional nature of this means that you can choose between pjson or the previous behavior. pjson ignores any field not annotated with
#[Json]
; so, while it provides more control (particularly in deserialization), it also levies requirements on the classes which it will handle.Downloads