Error while creating design document


#1

Hi i am using curl to create design document . but i am getting below error

{“error”:“bad_request”,“reason”:“invalid UTF-8 JSON: {{error,{74,\n “lexical error: invalid character inside string.\n”}},\n <<”{\r\n \“views\” : {\r\n \“byloc\” : {\r\n \“map\” : \“function(doc,meta)\r\n{ emit(meta.id,null)\r\n\r\n}\” \r\n }\r\n }\r\n}">>}"}

and also i want to create view to existing design document. but rest api we have while creating design document ly we need to specify view. is there way we can create view to existing design document without altering existing view.


#2

Hi, could you please give us the complete curl command you are using?
thanks


#3

oh sorry, It was my miss. had forgotten the string literal in curl commands. now its working …anyway thanks