Skip to content

Invalid json is being validated #13

Description

@DmitryRomanov
» 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")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions