Class SerializationHelper


  • public class SerializationHelper
    extends Object
    Helper class for EDML Serialization
    • Method Detail

      • addIfNotNullOrEmpty

        public static void addIfNotNullOrEmpty​(jakarta.json.JsonObjectBuilder jsonObjectBuilder,
                                               String key,
                                               String value)
        Add a key and string value to a json object builder if not null or empty
        Parameters:
        jsonObjectBuilder - the builder
        key - the key
        value - the value
      • addAsJsonObjectIfNotNullOrEmpty

        public static void addAsJsonObjectIfNotNullOrEmpty​(jakarta.json.JsonObjectBuilder jsonObjectBuilder,
                                                           String key,
                                                           String value)
        Add a key and json object (converted from string value) to a json object builder if not null or empty
        Parameters:
        jsonObjectBuilder - the builder
        key - the key
        value - the value