kubernetes-sigs / yaml

A better way to marshal and unmarshal YAML in Golang
Other
241 stars 73 forks source link

Should this library use json-iterator? #17

Open errordeveloper opened 5 years ago

errordeveloper commented 5 years ago

Kubernetes uses github.com/json-iterator/go instead of encoding/json, should this library switch also?

dims commented 5 years ago

sure!

neolit123 commented 5 years ago

/assign although need to find bandwidth. i'm yet to check https://github.com/kubernetes-sigs/yaml/issues/15 but i suspect discrepancy between the current backends: yaml2 vs encoding/json.

json-iter does support case sensitive JSON.

neolit123 commented 5 years ago

/kind feature /priority important-longterm

errordeveloper commented 5 years ago

json-iter does support case sensitive JSON.

You mean it can detect unknown keys in case-sensitive manner?

neolit123 commented 5 years ago

You mean it can detect unknown keys in case-sensitive manner?

yes. i have a PR in the works to enable json-iter. whether it makes it in is another question as it requires a minor breaking change.

fejta-bot commented 5 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot commented 5 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

neolit123 commented 5 years ago

initial reaction was that there is no good justification for this change: https://github.com/kubernetes-sigs/yaml/pull/19 /lifecycle frozen

neolit123 commented 3 years ago

Looks like there is desire to switch k/k away from json iter.

https://github.com/kubernetes/kubernetes/pull/105030

It suggests using a fork of stdlib, that supports the missing valudation features.