You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A seperate idea i had was we break this into a seperate module with the a fromJson and toJson this could allow for reuse, if we ever add a toml or yaml parser to the stdlib.
The text was updated successfully, but these errors were encountered:
If anyone has a good idea for this api let me know, Something like what i propose below might work well:
module JsonSearch
enum SearchError {
ExpectedGetProperyOnObject,
PropertyNotFound
}
getProperty(json: Json, property: string) => Result<Json, SearchError>
getPropeties(json: Json) => Result<string[], SearchError> // this could give an Err(ExpectedGetProperyOnObject)
If this is what the api looks like though it would probably be best to add this as a submodule. would love to hear some alternative ideas to the api I suggested above though, especially as the above doesnt make it easy to get nested props.
We are keeping the initial json pr small so we can get an mvp, we should come back and make a searchable api later.
Possible Propsal here: #1133 (comment)
A seperate idea i had was we break this into a seperate module with the a
fromJson
andtoJson
this could allow for reuse, if we ever add a toml or yaml parser to the stdlib.The text was updated successfully, but these errors were encountered: