HELP!

decodeData

This method decodes input string parameter into object values. An error string is returned if there are object name or values mismatch.

xpertrule.decodeData(inputStr);

inputStr

A string in wither XML or JSON format which specifies the object values to set.

The input string format (XML or JSON) is intellegently guessed based on the first character of the inputString. If the inputStr starts with '{', the input is judged to be a JSON definition, otherwise it is treated as an XML definition.

For more details of the JSON format, see setValuesWithObject.

The XML input format can be seen from the following example:

Actions

  • Set list object "Grade" value to "Director"
  • Set boolean object "InLondon" value to "Yes"
  • Set numeric object "Cost" value to 90
  • Set text object "Title" set value to "Miss"
  • Set date object "DateOfBirth" value to 28 th December 1982
<?xml version="1.0" encoding="ISO-8859-1" ?>
 <data>
  <Grade>Director</Grade>
  <InLondon>Yes</InLondon>
  <Cost>90</Cost>
  <Title>Miss</Title>
  <DateOfBirth>1982-12-28</DateOfBirth>
 </data>

On This Page