diff --git a/decode.go b/decode.go index 005431f..e322d42 100644 --- a/decode.go +++ b/decode.go @@ -1291,7 +1291,7 @@ func unquoteBytes(s []byte) (t []byte, ok bool) { } // Quote, control characters are invalid. - case orig[0] == '"' && c == '"', orig[0] == '\'' && c == '\'', c < ' ': + case orig[0] == '"' && c == '"', orig[0] == '\'' && c == '\'', c < ' ' && c != '\t': return // ASCII diff --git a/scanner.go b/scanner.go index 283459a..78d3c43 100644 --- a/scanner.go +++ b/scanner.go @@ -457,6 +457,9 @@ func stateInStringDouble(s *scanner, c byte) int { s.step = stateInStringEsc(stateInStringDouble) return scanContinue } + if c == '\t' { + return scanContinue + } if c < 0x20 { return s.error(c, "in string literal") }