diff --git a/src/lib.rs b/src/lib.rs index 4a3b3b5..05f44c9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -296,7 +296,7 @@ impl JSON { // Move to the next character: '}' self.increment(1); - Ok(Some(JSONValue::Object(result))) + Ok(Some(JSONValue::from(result))) } /// See if there's a `JSONValue::Array` next in the JSON @@ -325,7 +325,7 @@ impl JSON { // move to next character: ']' self.increment(1); - Ok(Some(JSONValue::Array(result))) + Ok(Some(JSONValue::from(result))) } /// See if there's a `JSONValue::String` next in the JSON @@ -385,7 +385,7 @@ impl JSON { self.eat('"')?; - Ok(Some(JSONValue::String(result))) + Ok(Some(JSONValue::from(result))) } /// See if there's a `JSONValue::Number` next in the JSON