Hi !
I have a problem with a jsonpath expression. I have the following JSON:
{
"STATUS": [
{
"STATUS": "S",
"When": 1516116436,
"Code": 11,
"Msg": "Summary",
"Description": "sgminer 5.6.2-l"
}
],
"SUMMARY": [
{
"Elapsed": 12040,
"MHS av": 10140.4782,
"MHS 5s": 10131.6409,
"KHS av": 10140478,
"KHS 5s": 10131641,
"Found Blocks": 0,
"Getworks": 841,
"Accepted": 1479,
"Rejected": 9,
"Hardware Errors": 0,
"Utility": 7.3705,
"Discarded": 7674,
"Stale": 0,
"Get Failures": 0,
"Local Work": 48659,
"Remote Failures": 0,
"Network Blocks": 806,
"Total MH": 122090053.3249,
"Work Utility": 35953.2862,
"Difficulty Accepted": 7151707.47550726,
"Difficulty Rejected": 49736.50586112,
"Difficulty Stale": 0,
"Best Share": 4552945.973721,
"Device Hardware%": 0,
"Device Rejected%": 0.6894,
"Pool Rejected%": 0.6906,
"Pool Stale%": 0,
"Last getwork": 1516116435
}
],
"id": 1
}
The path I want to extract is â$.SUMMARY[0].Hardware Errorsâ. The issue is that I get an exception with that:
2018-01-16 15:28:09.251 [ERROR] [hab.binding.exec.handler.ExecHandler] - An exception occurred while transforming â{
âSTATUSâ: [
{
âSTATUSâ: âSâ,
âWhenâ: 1516116489,
âCodeâ: 11,
âMsgâ: âSummaryâ,
âDescriptionâ: âsgminer 5.6.2-lâ
}
],
âSUMMARYâ: [
{
âElapsedâ: 12095,
âMHS avâ: 10138.718,
âMHS 5sâ: 10145.7327,
âKHS avâ: 10138718,
âKHS 5sâ: 10145733,
âFound Blocksâ: 0,
âGetworksâ: 843,
âAcceptedâ: 1482,
âRejectedâ: 9,
âHardware Errorsâ: 0,
âUtilityâ: 7.3517,
âDiscardedâ: 7705,
âStaleâ: 0,
âGet Failuresâ: 0,
âLocal Workâ: 48854,
âRemote Failuresâ: 0,
âNetwork Blocksâ: 808,
âTotal MHâ: 122628961.3825,
âWork Utilityâ: 35865.5606,
âDifficulty Acceptedâ: 7167126.50611462,
âDifficulty Rejectedâ: 49736.50586112,
âDifficulty Staleâ: 0,
âBest Shareâ: 4552945.973721,
âDevice Hardware%â: 0,
âDevice Rejected%â: 0.6879,
âPool Rejected%â: 0.6892,
âPool Stale%â: 0,
âLast getworkâ: 1516116489
}
],
âidâ: 1
}â with âJSONPATH($.SUMMARY[0].âHardware Errorsâ)â : âAn error occurred while transforming JSON expression.â
Anyone knows how I could fix this as an online jsonpath tester showed the correct results ?