# RPC hook error

**URL:** <https://forum.heroiclabs.com/t/rpc-hook-error/483>\
**Category:** Local Setup\
**Created:** [January 21, 2020, 7:53pm UTC](https://forum.heroiclabs.com/t/rpc-hook-error/483 "2020-01-21T19:53:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nkadd](https://avatars.discourse-cdn.com/v4/letter/n/13edae/32.png) [@nkadd](https://forum.heroiclabs.com/u/nkadd)\
**Post date:** [January 21, 2020, 7:53pm UTC](https://forum.heroiclabs.com/t/rpc-hook-error/483/1 "2020-01-21T19:53:43Z")

</div>

Hi.  
When I use my rpc hook I receive this error:

```auto
{
  "error": "json: cannot unmarshal object into Go value of type string",
  "message": "json: cannot unmarshal object into Go value of type string",
  "code": 3
}

```

My request:

```auto
POST /v2/rpc/updateStorage HTTP/1.1
> Host: 127.0.0.1:7350
> Content-Type: application/json
> Authorization: Bearer <my token>
> Accept: */*
> Content-Length: 80

 {
   "collection": "q",
   "key": "k",
   "newValue": {
     "value1": "value"
   }
 }

```

---

<div class="post-metadata">

**Author:** ![novabyte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/novabyte/32/1324_2.png) [@novabyte](https://forum.heroiclabs.com/u/novabyte)\
**Post date:** [January 22, 2020, 11:14am UTC](https://forum.heroiclabs.com/t/rpc-hook-error/483/2 "2020-01-22T11:14:10Z")

</div>

@nkadd You’ll either need to use the `?unwrap` query parameter to let you send raw JSON or you’ll need to escape the input as a JSON as an escaped body. i.e.

```json
"'{
   \"collection\": \"q\",
   \"key\": \"k\",
   \"newValue\": {
     \"value1\": \"value\"
   }
}'"

```
