[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] Sending JSON Body in HTTP_POST



Tony,

Can you show us how you are calling HTTPAPI.

Also you mentioned something about using "UC2" fields (UCS2, perhaps?) can you elaborate on that?  Most importantly, what encoding is the data in at the time that it is passed to HTTPAPI, and what encoding settings you're using in HTTPAPI.  Showing the code (rather than a description) is most helpful.

-SK


On 4/18/18 8:20 AM, Tony Cate wrote:
The endpoint is Camel (Java) service. That service uses Jackson to parse JSON, and it's throwing illegal character errors.

The JSON is pretty straight forward, and validates as correct here: https://jsonformatter.curiousconcept.com/

It's pretty simple (dumbed down:
{  
   "item":"JF1GH7G6",
   "userID":"1658",
   "sellerID":"SELLER",
   "Year":2010,
   "Style":"SW4D",
   "flags":{  
      "salvage":"false",
      "biohazard":"false",
      "fire":"false",
      "flood":"false"
   },
   "damage":[  
      {  
         "damageCode":258,
         "severityCode":54
      }
   ]
} 

I've read through this thread at your site: https://www.scottklement.com/archives/ftpapi/201308/msg00061.html

I've used the hex and UC2 values for brackets, braces, and comma's. set the ccsid to 819 (which Java purportedly likes) and 1208 as noted in the referenced post. Nothing seems to help. I asked the endpoint owner (internal) to send me back what was recieved and its gibberish...which is probably a hint of some sort.

Tony Cate


--
Tony Cate | Senior Programmer/Analyst | 704.872.2458 x 126
Auction Edge, Inc.
AUCTION EDGE, INC. | Powering Independent Auctions
STATESVILLE, NC | 704.872.2458



-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi