HG-16: Mercury API Extension

DO NOT MERGE, THIS PR IS PART OF PROJECT MERCURY! 
Something doesn't look right here. Why are we calling `json_decode` on the results returned from a `getText` method? I would expect this to fail.