JSON API: Add 'set-ptr' PTR-creating functionality