Skip to content

Commit

Permalink
Added ParseValue
Browse files Browse the repository at this point in the history
  • Loading branch information
IamFaizanKhalid committed Aug 13, 2023
1 parent ff1f380 commit 80c27a0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions jsonq.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ func ParseArray(b []byte) (Array, error) {

return arr, nil
}

func ParseValue(b []byte) (Value, error) {
var val any
err := json.Unmarshal(b, &val)

return Value{val}, err
}

0 comments on commit 80c27a0

Please sign in to comment.