square / pjson

JSON <=> PHP8+ objects serialization / deserialization library
Apache License 2.0
109 stars 7 forks source link

Fix serializing when path has integer bits #15

Closed khepin closed 1 year ago

khepin commented 1 year ago

Deserializing #[Json('list', 0, 'name')] was already fine but the issue was when re-serializing this.

Using stdClass meant it was impossible to set something at the property 0. By switching internally to an array, we can add properties and / or integer offsets correctly.

@mattgrande @bezhermoso @szainmehdi