Closed pnrobinson closed 2 years ago
We are getting a String version of the phenopacket that appears correct, but the ingest to Message is not working. Here is a short version
public Message fromString(String msg) throws PhenopacketValidatorInputException { try { Phenopacket.Builder builder = Phenopacket.newBuilder(); TextFormat.Parser parser = TextFormat.Parser.newBuilder().build(); parser.merge(msg, builder); return builder.build(); } catch (TextFormat.ParseException e ) { throw new PhenopacketValidatorInputException("Could not decode Message: " + e.getMessage()); } }
But we get
Could not decode Message: Expected identifier. Found '{'
Not that we have com.google.protobuf.TextFormat and version 2 Phenopacket in this code
Fixed, this should have been
Phenopacket.Builder builder = Phenopacket.newBuilder(); JsonFormat.parser().merge(jsonString, builder); message = builder.build();
We are getting a String version of the phenopacket that appears correct, but the ingest to Message is not working. Here is a short version
But we get
Not that we have com.google.protobuf.TextFormat and version 2 Phenopacket in this code