fedosov
fedosov

Reputation: 2049

Neo4j ValueRepresentation value

How can I get the original string value (someString) from instance of org.neo4j.server.rest.repr.ValueRepresentation created by this code as a return of server-plugin:

return ValueRepresentation.string(someString)

Upvotes: 0

Views: 49

Answers (1)

Michael Hunger
Michael Hunger

Reputation: 41706

What do you need that for?

Probably use serialize, pass in a RepresentationFormat that just passes on the value as result in its serializeValue method.

ValueRepresentation {
  String serialize( RepresentationFormat format, URI baseUri, ExtensionInjector extensions )
    {
        final String result = format.serializeValue(type, value);
        format.complete();
        return result;
    }
}

Upvotes: 0

Related Questions