sponsored links

Collapse

Announcement

Collapse
No announcement yet.

Receiving escape chars in the response of axiscTransportReceive() (YAJL on RPGLE)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Receiving escape chars in the response of axiscTransportReceive() (YAJL on RPGLE)

    Hello. I have just started using the your YAJL routines, working with RPGLE.
    So, please pardon if I am missing some basics here.


    I am receiving the below output after axiscTransportReceive in the response string.
    "{\n "message" : "NOT_EXISTS_MATCHED_DATA",\n "code" : "SMC_0104"\n}"

    Then I do a yajl_string_load_tree on this response string to get the parent node. Works fine till here.
    But when I doyajl_object_find for 'message' in this parent node, it returns a *NULL pointer.
    So I am not able to exact the message text. as a solution, I stripped the /n from the response string using %scanrpl.
    This does remove the /n, but then the yajl_string_load_tree fails with errmsg "Parse error: trailing garbage".

    Could you please advice on this.
    Thanks in advance for your help!!!


  • #2
    I'm not sure that I understand what you're saying is part of your document, and what is not?

    You show that the document starts and ends with a double quote mark. Are these actually in the document, or did you just provide them for this message?

    You show \n marks in the document. Are they truly the \ and n characters in your data? Or, are these meant to represent the newline characters (which aren't normally visible)?

    In any case, the errors are telling us that something is wrong with your JSON, it is not a valid document.

    Comment

    sponsored links

    Collapse

    Working...
    X