Postcommit hook and storing json object

Yousuf Fauzan yousuffauzan at
Sat Aug 25 15:56:36 EDT 2012


In a postcommit hook, I am storing an object in another bucket where data
is equal to
    Data = iolist_to_binary(mochijson2:encode({struct, [
                {<<"status">>, list_to_binary(Status)},
                {<<"recorddate">>, list_to_binary(Recorddate)},
                {<<"memberlogin">>, list_to_binary(User)}
and the content type is json.

Now when I run map reduce using JS, mapValuesJSON is actually giving me a
string instead of a dictionary.
I tried doing a JSON.parse of that with no luck.
can somebody help me figure out the right way to store JSON data in post
commit hook?

I tried without iolist_to_binary and then Riak.mapValuesJSON starts
throwing error.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list