feat(stdlib): Json value access utils#2150
Conversation
spotandjake
left a comment
There was a problem hiding this comment.
The implementation itself mostly looks great to me with a few minor notes.
I personally feel like as we are likely to add other libraries like Toml, Yaml and maybe more the searching would be better provided as a seperate library and we could have a toSearchable or something in the json library that converts the format. The searching semanitcs between bassically every config language is the same and most of the datatypes are the same.
|
I'd love for us to have combinators to search JSON, somewhat similar to what this TOML library does: https://github.com/ocaml-toml/To.ml?tab=readme-ov-file#lenses Ours wouldn't need to be quite that complex, and I think you'd only need some minor tweaks. |
|
@ospencer switched over to using lenses |
| * @since v0.7.0 | ||
| */ | ||
| provide let prop = propertyName => | ||
| { get: json => match (json) { |
There was a problem hiding this comment.
Unrelated to this PR but I don't really like how the formatter handles these records here
ospencer
left a comment
There was a problem hiding this comment.
This is beautiful! I'm excited to use this. Just a few minor doc changes and this is good to go.
e99cde8 to
ab6cd43
Compare
|
@ospencer done |

Closes #1877