Namespace: OpenEdge.Core.Json
Type: Class JsonPropertyHelper
Parent Classes:
Inherits: Progress.Lang.Object


/* *************************************************************************************************************************
Copyright (c) 2018 by Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
File:JsonPropertyHelper
Purpose:General JSON property value helper
Author(s):pjudge
Created:2018-12-13
/* Indicates whether a JSON object has a property of a specific
name and JSON type.



Method Summary
  Options Name Purpose
  Progress.Json.ObjectModel.JsonArray GetArrayValue (JsonObject, character, logical) /* Returns a JSON array for a named property @param JsonObject The JSON object into which to upsert the property @param character The property name @param logical TRUE if the method should always return a valid JSON array. FALSE will return an unknown value if an property does not yet exist of the specific type even if the property exists with a different datatype. @return JsonArray The JSON array. May be unknown/invalid */
  Progress.Json.ObjectModel.JsonObject GetObjectValue (JsonObject, character, logical) /* Returns a JSON object for a named property @param JsonObject The JSON object into which to upsert the property @param character The property name @param logical TRUE if the method should always return a valid JSON array. FALSE will return an unknown value if an property does not yet exist of the specific type even if the property exists with a different datatype @return JsonObject The JSON object. May be unknown/invalid */
  LOGICAL HasTypedProperty (JsonObject, character, integer) /* Indicates whether a JSON object has a property of a specific name and JSON type. @param JsonObject The JSON object containing the property @param character The property name @return logical TRUE if the parent is valid AND the property exists AND is of the specified type */

Method Detail
Top

Progress.Json.ObjectModel.JsonArray GetArrayValue (JsonObject, character, logical)

/* Returns a JSON array for a named property
an unknown value if an property does not yet exist of the specific type even if
the property exists with a different datatype.
Parameters:
pParent Progress.Json.ObjectModel.JsonObject
 
pProperty CHARACTER
 
pAlwaysReturn LOGICAL
 
Returns Progress.Json.ObjectModel.JsonArray
  JsonArray The JSON array. May be unknown/invalid
Top

Progress.Json.ObjectModel.JsonObject GetObjectValue (JsonObject, character, logical)

/* Returns a JSON object for a named property
an unknown value if an property does not yet exist of the specific type
even if the property exists with a different datatype
Parameters:
pParent Progress.Json.ObjectModel.JsonObject
 
pProperty CHARACTER
 
pAlwaysReturn LOGICAL
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject The JSON object. May be unknown/invalid
Top

LOGICAL HasTypedProperty (JsonObject, character, integer)

/* Indicates whether a JSON object has a property of a specific
name and JSON type.
Parameters:
pParent Progress.Json.ObjectModel.JsonObject
 
pProperty CHARACTER
 
pJsonType INTEGER
 
Returns LOGICAL
  logical TRUE if the parent is valid AND the property exists AND is of the specified type