code to support newtonsoft