Skip to content

Commit

Permalink
Rename to reduce confusion.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwald committed Oct 5, 2015
1 parent 097ff70 commit 26d686e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[![GoDoc](https://godoc.org/github.com/exponent-io/json?status.svg)](https://godoc.org/github.com/exponent-io/json)
[![Build Status](https://travis-ci.org/exponent-io/json.svg?branch=master)](https://travis-ci.org/exponent-io/json)
[![GoDoc](https://godoc.org/github.com/exponent-io/jsonpath?status.svg)](https://godoc.org/github.com/exponent-io/jsonpath)
[![Build Status](https://travis-ci.org/exponent-io/jsonpath.svg?branch=master)](https://travis-ci.org/exponent-io/jsonpath)

# json
# jsonpath

This package extends the [json.Decoder](https://golang.org/pkg/encoding/json/#Decoder) to support navigating a stream of JSON tokens. You should be able to use this extended Decoder in any place where a json.Decoder would have been used.

This Decoder has the following enhancements...
* The [SeekTo](https://godoc.org/github.com/exponent-io/json#Decoder.SeekTo) method supports seeking forward in a JSON token stream to a particular path.
* The [Path](https://godoc.org/github.com/exponent-io/json#Decoder.Path) method returns the path of the most recently parsed token.
* The [Token](https://godoc.org/github.com/exponent-io/json#Decoder.Token) method has been modified to distinguish between strings that are object keys and strings that are values. Object key strings are returned as the [KeyString](https://godoc.org/github.com/exponent-io/json#KeyString) type rather than a native string.
* The [SeekTo](https://godoc.org/github.com/exponent-io/jsonpath#Decoder.SeekTo) method supports seeking forward in a JSON token stream to a particular path.
* The [Path](https://godoc.org/github.com/exponent-io/jsonpath#Decoder.Path) method returns the path of the most recently parsed token.
* The [Token](https://godoc.org/github.com/exponent-io/jsonpath#Decoder.Token) method has been modified to distinguish between strings that are object keys and strings that are values. Object key strings are returned as the [KeyString](https://godoc.org/github.com/exponent-io/jsonpath#KeyString) type rather than a native string.

## Installation

go get -u github.com/exponent-io/json
go get -u github.com/exponent-io/jsonpath

## Usage

import "github.com/exponent-io/json"
import "github.com/exponent-io/jsonpath"

var j = []byte(`[
{"Space": "YCbCr", "Point": {"Y": 255, "Cb": 0, "Cr": -10}},
Expand Down
2 changes: 1 addition & 1 deletion decoder.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package json
package jsonpath

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion decoder_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package json
package jsonpath

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package json
package jsonpath

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion path.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Extends the Go runtime's json.Decoder enabling navigation of a stream of json tokens.
package json
package jsonpath

import "fmt"

Expand Down
2 changes: 1 addition & 1 deletion path_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package json
package jsonpath

import (
"bytes"
Expand Down

0 comments on commit 26d686e

Please sign in to comment.