modivied toJson Test to be platform independant