ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Klement JSON procedures for RPGLE

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

  • Klement JSON procedures for RPGLE

    to do this
    ?validPaymentTypes":["type","CEFT","type","CHECK","type","EFT"]

    I do this -
    yajl_addChar('type' : %trim(l_paymentType));


    Is there a way to elminate the "type" and do this...

    "validPaymentTypes":["CEFT", "CHECK", "CRDIT", "EFT"] <- does not have ?type? qualifier

  • #2
    Did you try eliminating the "type"? I'm a little confused.

    You seem to be saying you want to do this, right?

    Code:
    yajl_addType(%trim(l_paymentType));
    That works, doesn't it?

    I think you're looking at an example of adding a string to an object, where you pass two parameters to yajl_addChar()... but, this isn't an object. You should be passing only one parameter.

    Comment


    • #3
      That's correct Scott. I havn't tried yajl_addType. It was not referenced in the PDF I was viewing that you created on this. But I'm sure it will do what I need. Is there a link that provides a complete list of available yajl procedures that you created for this?

      Comment


      • #4
        Sorry, that was a typo, it should be yajl_addChar() as mentioned in the paragraph below it.

        The list of procedures is in the copybook, YAJL_H

        Comment

        Working...
        X