On Sat, Sep 17, 2011 at 5:11 PM, Greg Pascale <g...@clipboard.com> wrote: > Hi, > I'm trying to write a simple precommit hook to modify a JSON object by > removing certain fields. The simplest way to do this, I figure, is to decode > the object's value with mochijson2, remove the fields I don't want, > re-encode it, and update the value. > What happens, though, is my object ends up somehow mangled. When I inspect > it via curl, it sort of looks like JSON, but characters like "{" and ":" > seem to be replaced with garbage. > For example, what should read "hostname":"www.google.com" looks > like hostnamea"ja:la"mwww.google.coma"j
If I had to guess, I would say that you are seeing some sort of weird unicode encoding of the double-quote character; maybe the data stored was UTF-16 encoded? I.e. is there some unicode character that would display a " but actually be stored as [a, "]? D. -- Dave Smith Director, Engineering Basho Technologies, Inc. diz...@basho.com _______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com