code: private static JsonObjectBuilder addProperties( JsonObjectBuilder builder, VarValueDef value)
      {
      JsonArrayBuilder properties = Json.createArrayBuilder();
      value.getProperties().forEach( property -> properties.add( property));
      JsonArray json = properties.build();
  
      if( !json.isEmpty())
        {
        builder.add( PROPERTIES_KEY, json);
        }
  
      return builder;
      }
docs: Add any properties from the given value to the given JsonObjectBuilder.