Adding WriteJson methods