I want to know if using javaclient to query schema provides a way to return JSON format

Posted by yunzaiqintian:

Similar to the format returned by HTTP requests. If so, please let me know. Thank you.

	String query ="schema {}";
	Response res = dgraphClient.newTransaction().query(query);
	List<SchemaNode> schemaList = res.getSchemaList();

I haven’t seen it yet.

yunzaiqintian commented :

like this
{
“data”: {
“schema”: [
{
“predicate”: “Classmate”,
“type”: “uid”
},
{
“list”: true,
“predicate”: “predicate”,
“type”: “string”
}
]
},
“extensions”: {
“server_latency”: {
“encoding_ns”: 1197450,
“parsing_ns”: 300,
“processing_ns”: 1233
},
“txn”: {
“start_ts”: 1047550
}
}
}
not this
[
predicate: “grandson”
type: “uid”
, predicate: “actor.film”
type: “uid”
, predicate: “dgraph.xid”
type: “string”
index: true
tokenizer: “exact”
, predicate: “performance.actor”
type: “uid”
, predicate: “director”
type: “uid”
]

mangalaman93 commented :

This is a grpc client. You can use any of the REST libraries to talk to Dgraph directly https://docs.dgraph.io/clients/#raw-http