Created on 16 January 2020
icon_unfollowing
Login to follow
json-tool-kit

JSON Tool Kit

Stable version 1.1.1 (Compatible with OutSystems 11)
Uploaded on 24 November 2021 by 
json-tool-kit

JSON Tool Kit

Documentation
1.1.1


  • First the JSON passed as source needs always a root element (in the below example there's a 'root' property, could be with any other name):


"{
  
  'root': {
    'person': [
      {
        '@id': '1',
        'name': 'Alan',
        'url': 'http://www.google.com'
      },
      {
        '@id': '2',
        'name': 'Louis',
        'url': 'http://www.yahoo.com'
      }
    ]
  }
}"


  • Example of the action AddArrayItem (This action load a JSON, and then you can add a array item. Returns the new JSON with the new array item):


   a) JSON source input parameter: 

"{
  'root': {
    'title': 'Star Wars',
    'link': 'http://www.starwars.com',
    'description': 'Star Wars blog.',
    'obsolete': 'Obsolete value',
    'item': []
  }
}"

b) The other inputs parameters:

c) The result:



  • Example of the action AddProperty (This action load a JSON, and then you can add a property. Returns the new JSON with the new property included.):


a) JSON source input parameter: 

"{
  
  'root': {
    'person': [
      {
        '@id': '1',
        'name': 'Alan',
        'url': 'http://www.google.com'
      },
      {
        '@id': '2',
        'name': 'Louis',
        'url': 'http://www.yahoo.com'
      }
    ]
  }
}"


b) The other inputs parameters:



c) The result:



  • Example of the action JSONtoXML(Converts JSON into XML):


a) JSON source input parameter: 




b) The other inputs parameters:




c) The result:


  • Example of the action PropertyValueToUpper(Transforms a property value to upper case.)


a) JSON source input parameter: 



b) The other inputs parameters:


c) The result:



  • Example of the action RemoveProperty(This action load a JSON, and then you can remove a property. Returns the new JSON without that property):


a) JSON source input parameter: 



b) The other inputs parameters:



c) The result:



  • Example of the action SelectToken(This action returns the selected token.)


a) JSON source input parameter: 



b) The other inputs parameters:



c) The result:





  • Example of the action SelectTokens(This action returns the selected tokens.):


a) JSON source input parameter: 



b) The other inputs parameters:




c) The result:




  • Example of the action XMLtoJSON(This action returns the selected tokens.):


a) JSON source input parameter: 

b) The other inputs parameters:





c) The result:




More info about, and how to use it:

- https://www.newtonsoft.com/json/help/html/ModifyJson.htm

- https://www.newtonsoft.com/json/help/html/QueryJson.htm




Support options
This asset is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from  who created this asset.
Dependencies
JSON Tool Kit has no dependencies.