Class PhenopacketPrintUtil
java.lang.Object
org.phenopackets.phenopackettools.util.print.PhenopacketPrintUtil
A static utility class for obtaining JsonFormat.Parser and JsonFormat.Printer
configured for printing Phenopacket Schema elements.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.protobuf.util.JsonFormat.Parser
Get a parser configured for parsing Phenopacket Schema elements from JSON format.static com.google.protobuf.util.JsonFormat.Printer
Get a printer configured for printing Phenopacket Schema elements into JSON while respecting the special requirements of the schema.
-
Method Details
-
getParser
public static com.google.protobuf.util.JsonFormat.Parser getParser()Get a parser configured for parsing Phenopacket Schema elements from JSON format. -
getPrinter
public static com.google.protobuf.util.JsonFormat.Printer getPrinter()Get a printer configured for printing Phenopacket Schema elements into JSON while respecting the special requirements of the schema.Currently, the special requirements include printing all enum field values, including the default values whose presence is implied in absence of the JSON field by Protobuf.
- Returns:
- the printer
-