Json output using forms

This question was answered in the forum here.

Docs on this are here.