simplified json-p implementation.