Class Serializer
- java.lang.Object
-
- io.weaviate.client.v1.graphql.query.util.Serializer
-
public class Serializer extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Stringarray(T[] input)Creates array string It is up to user to make elements json safestatic <T,R>
Stringarray(T[] input, Function<T,R> mapper)Creates array string It is up to user to make elements json safestatic StringarrayWithQuotes(String[] input)Creates json safe array string Surrounds each input string with double quotes, nested quotes are escapedstatic Stringescape(String input)Creates graphql safe string Nested quotes are escapedstatic Stringquote(String input)Creates graphql safe string Surrounds input string with double quotes, nested quotes are escaped
-
-
-
Method Detail
-
escape
public static String escape(String input)
Creates graphql safe string Nested quotes are escaped- Parameters:
input- string- Returns:
- escaped string
-
quote
public static String quote(String input)
Creates graphql safe string Surrounds input string with double quotes, nested quotes are escaped- Parameters:
input- string- Returns:
- quoted string
-
arrayWithQuotes
public static String arrayWithQuotes(String[] input)
Creates json safe array string Surrounds each input string with double quotes, nested quotes are escaped- Parameters:
input- array of strings- Returns:
- json safe array string
-
array
public static <T> String array(T[] input)
Creates array string It is up to user to make elements json safe- Parameters:
input- array of arbitrary elements- Returns:
- array string
-
-