Class POBExtensions

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • toValueJsonArray

         final static JSONArray toValueJsonArray(JSONObject $self)

        Flattens this object (string keys, each value a JSONArray of strings) into a single JSONArray of all trimmed non-empty strings from every inner array, in key iteration order. Duplicate strings (within one inner array or across keys) are omitted; the first occurrence wins.

        Returns null if this object is empty or no inner array contains valid entries. Returns unique values Used for imp.ext.owsdk.appstatusschemes as one flat string array (not array-of-arrays). input {"appInstallStatus":{"android":{"temu.com":"temu"},"iOS":{"temu.com":"temu"}}} output "temu"

      • putIfNotNullOrEmpty

         final static JSONObject putIfNotNullOrEmpty(JSONObject $self, String key, String value)

        Extension function to add key-value only if the value is not null or empty

        Parameters:
        key - The key under which the jsonValue will be added.
        value - Value to be added to the current JSONObject.
      • putIfNotEmpty

         final static JSONObject putIfNotEmpty(JSONObject $self, String key, JSONObject value)

        Extension function to add a key-value pair to a JSONObject only if the value JSONObject is not empty.

        Parameters:
        key - The key under which the value will be added.
        value - The JSONObject to be added.