• v1.0.0-beta3 478684621c

    v1, Beta 3 Pre-Release

    danieljsummers released this 2024-06-29 15:53:39 +00:00 | 17 commits to main since this release

    This release implement support for pjson-decorated classes. If the class has a toJson instance method, it will be used to serialize the JSON instead of json_encode, and if the class has a fromJsonString static method, it will be used to deserialize the JSON instead of json_decode and JsonMapper::map. (Both of these are provided by the JsonSerialize 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