Read JSON Object

shanabeywicremashanabeywicrema Member Posts: 53
edited 2022-07-06 in NAV Three Tier
Can we extract Object (nested Object) name from this kind of JSON? I am able to count how many objects are in the json, but cannot extract value. ("27675","27676") I am using Newtonsoft



  • shanabeywicremashanabeywicrema Member Posts: 53
    This is how my code.

    APIResult := JsonConvert.SerializeObject(result);
    APIResult := JsonConvert.DeserializeObject(APIResult,GETDOTNETTYPE(APIResult));
    JProperties := JObject1.Parse(APIResult);

    FOR i := 0 TO JObject1.Count DO BEGIN

  • AlexDenAlexDen Member Posts: 82

    Below is an example, how to get list of properties of JsonObject:
    PROCEDURE ReadJsonString(JsonText : Text);
          JObject : DotNet "'Newtonsoft.Json'.Newtonsoft.Json.Linq.JObject";
          JProperty : DotNet "'Newtonsoft.Json'.Newtonsoft.Json.Linq.JProperty";
          IEnumerable : DotNet "'mscorlib'.System.Collections.Generic.IEnumerable`1";
          IEnumerator : DotNet "'mscorlib'.System.Collections.Generic.IEnumerator`1";
          JObject := JObject.Parse(JsonText);
          IF NOT JObject.HasValues THEN
          IEnumerable := JObject.Properties;
          IEnumerator := IEnumerable.GetEnumerator;
          WHILE IEnumerator.MoveNext DO BEGIN
            JProperty := IEnumerator.Current;
            IF ISNULL(JProperty) THEN
            MESSAGE('Name: %1\Value: %2', JProperty.Name, JProperty.Value);
  • surbhinahtasurbhinahta Member Posts: 1
    Used to analyze two JAVA boolean articulations and return bogus on the off chance that both the boolean articulations are misleading, or, in all likelihood it returns valid assuming any of the boolean articulation is valid. A boolean articulation is an articulation that outcomes in a boolean worth - valid or bogus.

Sign In or Register to comment.