JSON API: fixes in recursor API code