Convert JSON to ValuePermanent link for this heading

The use case Convert JSON to value (FSCEXPEXT@1.1001:JSON2Value) is used to convert a JSON string to Fabasoft Folio values.

Example

app.ducx Use Case Language

import FSCEXPEXT@1.1001;

usecase SampleConvertValueToJSON() {
  variant Object {
    impl = expression {
      string json = "{\"key\":\"value\"}";
      jsonval = coouser.JSON2Value(json);
      coort.Trace("value", jsonval);K
    }
  }
}

// trace result
value[0/1]: DICTIONARY = 1 entries
-- key[0/1]: STRING = value

The use case defines the following parameters:

  • json
    Input parameter that takes the JSON string as STRING type.
  • value
    Output parameter (return value) that returns the converted value. The type depends on the JSON string (complex JSON strings are returned as DICTIONARY, whereas a simple JSON integer array is returned as INTEGERLIST)