sponsored links

Collapse

Announcement

Collapse
No announcement yet.

YAJL parse error: premature EOF

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

  • YAJL parse error: premature EOF

    Hi, I am trying to retrieve a json file into a variable with the following statement

    jsonData = http_string( 'GET': url);

    It succesfully executes the statement, but when I try and parse the string with the following I get and error

    docNode = yajl_buf_load_tree( %addr(jsonData: *data)
    : %len(jsonData)
    : ErrMsg );

    The result of ErrMsg is parse error: premature EOF

    The result that I am retrieving is quite large and if I paste the result in to a text file, it is about 400kb,

    How an I suppose to do this. Keep in mind that I am not an expert in RPG or using YAJL.

    Thanks

  • #2
    How is http_string() defined? It is not a YAJL function.

    yajl_buf_load_tree expects data in EBCDIC is that what http_string() returns?

    Comment


    • #3
      Jon,

      http_string() is part of HTTPAPI, snd yes, it'll return data in EBCDIC (unless configured to do something else.)

      Marcusis,

      It's not clear what the problem is. You say you're receiving premature EOF... but you haven't told us why you're getting this. Is your variable too small? Is http_string() cutting the data off? Is something wrong with the data?

      You'll need to look at what's happening in the program to tell us more.

      Comment

      sponsored links

      Collapse

      Working...
      X