Class PredicateQuerySerializer
- java.lang.Object
-
- com.yahoo.search.predicate.serialization.PredicateQuerySerializer
-
public class PredicateQuerySerializer extends java.lang.Object
ConvertsPredicateQuery
to and from JSON Example: { features: [ {"k": "key-name", "v":"value", "s":"0xDEADBEEFDEADBEEF"} ], rangeFeatures: [ {"k": "key-name", "v":42, "s":"0xDEADBEEFDEADBEEF"} ] }- Author:
- bjorncs
-
-
Constructor Summary
Constructors Constructor Description PredicateQuerySerializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PredicateQuery
fromJSON(java.lang.String json)
static java.util.List<PredicateQuery>
parseQueriesFromFile(java.lang.String queryFile, int maxQueryCount)
java.lang.String
toJSON(PredicateQuery query)
void
toJSON(PredicateQuery query, java.io.Writer writer)
-
-
-
Method Detail
-
toJSON
public java.lang.String toJSON(PredicateQuery query)
-
toJSON
public void toJSON(PredicateQuery query, java.io.Writer writer) throws java.io.IOException
- Throws:
java.io.IOException
-
fromJSON
public PredicateQuery fromJSON(java.lang.String json)
-
parseQueriesFromFile
public static java.util.List<PredicateQuery> parseQueriesFromFile(java.lang.String queryFile, int maxQueryCount) throws java.io.IOException
- Throws:
java.io.IOException
-
-