couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sujan Dutta <sujandu...@live.in>
Subject RE: couchdb modify the json object
Date Wed, 01 Jun 2011 13:28:07 GMT

hi thanks for the quick reply

well i have modified the input json

curl -H "Content-Type: application/json" -X POST "http://192.168.1.89/tavisca/couch/sampledb"
-d '{"createddate":"\/Date(-684302343434)\/"}'
{"ok":true,"id":"cf64b69588f524490c69b959e1035893","rev":"1-789e3ac88127655dfd57626b422ead54"}

curl -X GET http://192.168.1.89/tavisca/couch/sampledb/cf64b69588f524490c69b959e1035893
{"_id":"cf64b69588f524490c69b959e1035893","_rev":"1-789e3ac88127655dfd57626b422ead54","createddate":"/Date(-684302343434)/"}


this is the actual problem, i would be greatful if u could provide me a solution.

thanks

> Subject: Re: couchdb modify the json object
> From: sebastiancohnen@googlemail.com
> Date: Wed, 1 Jun 2011 15:10:13 +0200
> To: user@couchdb.apache.org
> 
> Hi Sujan,
> 
> what are you expecting?
> 
> curl -H "Content-Type: application/json" -X POST "http://localhost:5984/test" -d '{"createddate":"\\/Date(-684302343434)\\/"}'
> # -> {"ok":true,"id":"496da5f24ef4d4c11f80b8b22e0004e8","rev":"1-1b46cd563ef2dcca42c5e9f45de8c308"}
> 
> curl -X GET http://localhost:5984/test/496da5f24ef4d4c11f80b8b22e0004e8
> # -> {"_id":"496da5f24ef4d4c11f80b8b22e0004e8","_rev":"1-1b46cd563ef2dcca42c5e9f45de8c308","createddate":"\\/Date(-684302343434)\\/"}
> 
> On 01.06.2011, at 14:56, Sujan Dutta wrote:
> 
> > 
> > I am new to couchdb and i have a problem now
> > 
> > well i have a date field which i am putting it as
> > 
> > "createddate":"\\/Date(-684302343434)\\/"
> > 
> > but it is storing in doc as 
> > 
> > "createddate":"/Date(-684302343434)/"
> > 
> > how do i could solve this problem ?
> > 		 	   		  
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message