JSON based template system