summaryrefslogtreecommitdiff
path: root/compat/json/borrowed_misc.go
blob: 30a3b0e6a98bf812ae2ff0ad484a653f7881f1d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package json

// A SyntaxError is a description of a JSON syntax error.
// Unmarshal will return a SyntaxError if the JSON can't be parsed.
type SyntaxError struct {
	msg    string // description of error
	Offset int64  // error occurred after reading Offset bytes
}

func (e *SyntaxError) Error() string { return e.msg }