How to get JSON data from local

0
I have a JSON file, and want to use my mendix project to get json data from this file, what should I do? May I know the procedures for this. The json data format is below: { "GridDataList": [ { "Currency": "$(M)", "Geo": "AP", "GroupLevels": [], "ID": "2", "KpiItemList": [ { "Name": "Target Budget", "Value": "317.6" }, { "Name": "Sales Forecast", "Value": "0.0" }, { "Name": "Funded Volume", "Value": "0.0" }, { "Name": "CD Forecast", "Value": "0.3" } ], "TimeString": "As of: 28 Feb 2013 07:58 PM", "Title": null } ], "TimeString": "As of: 28 Feb 2013 07:47 PM" } Thanks in advance.
asked
1 answers
0

Hi Tingk,

Import the CommunityCommons modules and Rest Services modules from the Appstore. Assuming the json is in a filedocument of your project:

  1. Use the StringFromFile java action of community commons to retrieve the string contents.
  2. You can then use the deserializeJsonToObject java action of RestServices to parse the JSON body
answered