ozontech / ozontech/insane-json
Invalid json is being validated
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
» echo "{"field1":"email\SECMASKED"}" | jq 5
jq: parse error: Invalid numeric literal at line 1, column 9
but check is passed
func TestDecodeSpecialChar(t *testing.T) {
json := `{"field1": "email\SECMASKED"}`
root, err := DecodeString(json)
defer Release(root)
assert.NoError(t, err, "error while decoding")
assert.NotNil(t, root, "node shouldn't be nil")
assert.True(t, root.IsObject(), "wrong first node")
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with DecodeString and TestDecodeSpecialChar in the issue body, then run the test to reproduce the acceptance of the malformed JSON escape. Done means the invalid input is rejected and the test verifies the resulting error behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100