Class RegexpGsonBuilderUtil

java.lang.Object
ca.uhn.fhir.jpa.util.RegexpGsonBuilderUtil

public class RegexpGsonBuilderUtil extends Object
The whole purpose of his class is to ease construction of a non-trivial gson.JsonObject, which can't be done the easy way in this case (using a JSON string), because there are valid regex strings which break gson, as this: ".*\\^Donor$"
  • Method Details

    • toGson

      public static com.google.gson.JsonObject toGson(String thePropName, String theValue)
      Builds a json object as this sample: {"regexp":{" + thePropName + ":{"value":" + theValue + "}}}