Changed creation of JSON as strings and used json4js-native instead