Hello all,
Running into a JSON.load issue using json (1.8.1 java, 1.8.0 java, 1.7.7
java, 1.7.6 java) gem
So here is the scenario we store some prop values for products we have
as json string in mysql db. This was all working fine until we started
adding more products and more attributes to these products. For some of
these products when I attempt to load via JSON.load() I have seen this
error injected randomly which is causing ruby to blow up and not return
my json object.
JSON::ParserError dump:
“accountOnFile”:{“pseudoDDAEnabled”:false,“uniquenessCalculationMethod”:null,“lowBalanceThreshold”:[],“identificationRequiredForUserType”:[],“emailRequired”:false,"EMAILREQUIREDFORUSERTYPE{“errorCode”:“input.json.mapping.error”,“message”:“Bad
Request: Unable to map the request JSON to an entity. Invalid limits”}’
actual json value in db:
“accountOnFile”:{“DAEnabled”:false,“uniquenessCalculationMethod”:null,“emailRequired”:false,“identificationRequiredForUserType”:[],“lowBalanceThreshold”:[],“primaryUserType”:“DEFAULT”,“defaultAccountCode”:“account”,“EMAILREQUIREDFORUSERTYPE”:[],“defaultTimeZone”:null,“dateOfBirthRequired”:false,“numberOfRequiredPhones”:0,“defaultCurrency”:“USD”,“externalRefRequiredForUserType”:[],“idvRequiredForUserType”:[],“upgradeTags”:[],“languageRequired”:false,“requiredIdentificationForUserType”:[],“uniquenessLimits”:[],“maximumUsersOfType”:[],“numberOfIdentification”:0,“OnAccountCreation”:false,“channelRequiredForUserType”:[],“genderRequired”:false,“period”:63,“historyFormat”:null,“allow”:false,“channelRequired”:false,“exclude”:false,“requiredIdentification”:[],“externalRefRequired”:false,“numberOfPhones”:0,“numberOfRequiredIdentification”:0,“accountCode”:“balanceadjustment”,“phoneRequiredForUserType”:[“phoneRequired=true”],“defaultUserType”:“DEFAULT”,“allow”:true,“dateOfBirthRequiredForUserType”:[],“ALength”:13,“UserType”:[],“DAPrefix”:null,“strategy”:“Xzz”,“upgradeAllowed”:false,“defaultStrategy”:“gift”,“demographicRestrictionsCode”:“US”,“numberOfRequiredIdentificationForUserType”:[],“uniquenessCheckRequired”:false,“userSettings”:null},“bpayment”:{“monthlyCountLimit”:0,“monthlyAmountLimit”:0,“dailyCountLimit”:0,“maximumPayeesAllowed”:0,“billPaymentProvider”:null,“weeklyAmountLimit”:0,“billPaymentSupported”:false,“dailyAmountLimit”:0,“weeklyCountLimit”:0}
I’ve tried adding :max_nesting => false and it has had no effect. Any
help is appreciated as Im running out of ideas