Like above.
By creating blank applications. You can set html header to json etc and output json the php way.