cameront/go-jsonpatch — pull request #1 by umisama (2014-07-13 09:44:23+00:00)
Title: support for apply to pointers to interface{}

go-jsonpatch returns error in Apply() if source value is defined as interface{}. but, acutual type may be map[string]interface{} or []interface{}.

For example, v is defined as interface{} but acutual type is map[string]interface{}.
```go
package main

import (
"encoding/json"
"github.com/cameront/go-jsonpatch"
)

func main() {
patch, _ := jsonpatch.FromString(`[{ "op": "add", "path": "/baz", "value": "qux" }]`)

var v interface{}
json.Unmarshal([]byte(`{"baz":"qux","foo":"bar"}`), &v)

err := patch.Apply(&v)
if err != nil {
// returns "Can only apply to pointers to maps and arrays of interfaces."
println(err.Error())
}
}
```

so, I changed type checking method to with actually in this PR.

thank you.