<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/walk/read.go
diff options
context:
space:
mode:
Diffstat (limited to 'walk/read.go')
-rw-r--r--walk/read.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/walk/read.go b/walk/read.go
index c98b941..00be010 100644
--- a/walk/read.go
+++ b/walk/read.go
@@ -266,7 +266,7 @@ func (in *JSONIn) fillReadBuffer(structure []JSONInStructure) ([]JSONInStructure
value: {
r, err := in.nextNonWsRune()
if err != nil {
- return structure, err
+ panic("Missing value in JSON")
}
switch r {
case 'n':
@@ -404,7 +404,7 @@ func (in *JSONIn) fillReadBuffer(structure []JSONInStructure) ([]JSONInStructure
valueEnd: {
r, err := in.nextNonWsRune()
if err != nil {
- return structure, err
+ return append(structure, JSONInValueEnd), err
}
underState := structure[len(structure) - 1]
if underState == JSONInRoot {