I have released <kPointer>, a KMP library for acce...
# feed
m
I have released kPointer, a KMP library for accessing object structures using pointer-style paths. Supported object structures are JSON, YAML, HTML, and XML, with an extensible adapter system to make it easy to support others. Pointer support includes flavors of JSON Pointer plus "JavaScript access paths" (dot-and-bracket notation, like
foo.bar.goo
or
foo[0]
). See the announcement blog post for more!
👍 1
K 7
s
Is "pointer" here the same like "path", as in github.com/a-sit-plus/jsonpath4k? At least the referred RFC numbers seem to be different...
Anyway, cool that you're hosted at Codeberg 😎
thank you color 1
m
JSON Pointer is a different standard than JSON Path, but they do overlap to an extent
💡 1
s
BTW, did you choose github.com/him188/yamlkt for YAML because github.com/charleskorn/kaml is dead by now, or would you have chosen it anyway? Also, did you have a look at github.com/juanchurtado1991/ghost-serializer yet in that context?
m
I didn't really consider (konsider? 😀 ) kaml for that reason, so I don't know if I would have chosen if it were more lively. Ghost Serializer came out very recently, after I had implemented JSON support (originally in cw-json, then migrated to kPointer). Plus, it's unclear if they are strictly limited to generated serializers -- kPointer is designed for arbitrary data shapes. They have some
RawJson
support, but I don't know if it is designed for just a property or for a full object from scratch.
👍🏻 1
b
Appreciate the spotlight for JsonPath4K! Still, I have to say, RFC9535 is a complex beast and achieving compliance was no small feat. Hence, a more streamlined library like kPointer, following RFC 6901 will probably cover 90% of use cases without that complexity AND work on more wire formats. Also, Appendix C, of the JSONPath RFC mentions both standards to be complimentary, and normalised JSONPaths can be converted to a JSON Pointer.
👍🏻 1