My favorites | Sign in
Project Home
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 82: TouchJSON crash on deserializeAsDictionnary
2 people starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Aug 2010


 
Reported by dquef...@gmail.com, Jul 19, 2010
What steps will reproduce the problem?

Trying to deserialize this JSON:

{"data":{"eop-service-url":{"contextpath":"/engine","relative":"/engine/lcl"},"eop-value":[{"name":"literalOperator","value":"undefined-op"},{"name":"literalCustomerType","value":""},{"name":"literalAuthenticated","value":true},{"name":"literalLogoType","value":"LCL"},{"name":"literalSize","value":1}],"eop-object":{"class":"lcl.AccountStatus","name":"objectAccountStatus","eop-member":[{"isSecured":false,"name":"balance","owner-class":"lcl.AccountStatus","type":"string","$":"100,00 +"},{"isSecured":false,"name":"labelLong","owner-class":"lcl.AccountStatus","type":"string","$":"Compte de dépôts"},{"isSecured":false,"name":"number","owner-class":"lcl.AccountStatus","type":"string","$":"448660K"},{"isSecured":false,"name":"labelDevise","owner-class":"lcl.AccountStatus","type":"string"},{"isSecured":false,"name":"compteEnDevise","owner-class":"lcl.AccountStatus","type":"string","$":false}]},"eop-list":{"class":"lcl.AccountOperation","first_index":1,"full_size":"unknown","has_more_elements":false,"last_index":1,"name":"listOfOperations","page_index":1,"page_number":"unknown","size":1,"eop-item":{"current":1,"index":1,"owner":"listOfOperations","eop-member":[{"isSecured":false,"name":"date","owner-class":"lcl.AccountOperation","type":"string","$":"22/06"},{"isSecured":false,"name":"amount","owner-class":"lcl.AccountOperation","type":"string","$":"+100,00"},{"isSecured":false,"name":"description","owner-class":"lcl.AccountOperation","type":"string","$":"  VIRMT DE SOLDE COMPTE LCL"}]}},"eop-action":[{"action-name":"a","name":"linkAccountBalances","session-id":"C99CB8B6F457EB87C313E20D937F651B","type":"simple","uri":"/engine/lcl/-1-4-4","url":"/engine/lcl/-1-4-4?a=1.1041","value":1.1041},{"action-name":"a","name":"linkBack","session-id":"C99CB8B6F457EB87C313E20D937F651B","type":"previous-context","uri":"/engine/lcl/-1-4-4","url":"/engine/lcl/-1-4-4?a=2.1041","value":2.1041},{"action-name":"a","name":"linkMenu","session-id":"C99CB8B6F457EB87C313E20D937F651B","type":"simple","uri":"/engine/lcl/-1-4-4","url":"/engine/lcl/-1-4-4?a=3.1041","value":3.1041},{"action-name":"a","name":"gotoTransferDebtor","session-id":"C99CB8B6F457EB87C313E20D937F651B","type":"change-context","uri":"/engine/lcl/-1-4-4","url":"/engine/lcl/-1-4-4?a=4.1041","value":4.1041},{"action-name":"a","name":"gotoTransfer","session-id":"C99CB8B6F457EB87C313E20D937F651B","type":"change-context","uri":"/engine/lcl/-1-4-4","url":"/engine/lcl/-1-4-4?a=5.1041","value":5.1041},{"action-name":"a","name":"gotoCreditCardBalances","session-id":"C99CB8B6F457EB87C313E20D937F651B","type":"change-context","uri":"/engine/lcl/-1-4-4","url":"/engine/lcl/-1-4-4?a=6.1041","value":6.1041},{"action-name":"a","name":"gotoLogout","session-id":"C99CB8B6F457EB87C313E20D937F651B","type":"change-context","uri":"/engine/lcl/-1-4-4","url":"/engine/lcl/-1-4-4?a=7.1041","value":7.1041},{"action-name":"a","name":"linkDisconnect","session-id":"C99CB8B6F457EB87C313E20D937F651B","type":"change-context","uri":"/engine/lcl/-1-4-4","url":"/engine/lcl/-1-4-4?a=8.1041","value":8.1041},{"action-name":"a","name":"linkInfos","session-id":"C99CB8B6F457EB87C313E20D937F651B","type":"change-context","uri":"/engine/lcl/-1-4-4","url":"/engine/lcl/-1-4-4?a=9.1041","value":9.1041},{"action-name":"a","name":"linkNumeros","session-id":"C99CB8B6F457EB87C313E20D937F651B","type":"change-context","uri":"/engine/lcl/-1-4-4","url":"/engine/lcl/-1-4-4?a=a.1041","value":"a.1041"}]}}

What is the expected output? What do you see instead?

 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString appendString:]: nil argument'
*** Call stack at first throw:
(
	0   CoreFoundation                      0x0293a919 __exceptionPreprocess + 185
	1   libobjc.A.dylib                     0x02a885de objc_exception_throw + 47
	2   CoreFoundation                      0x028f3078 +[NSException raise:format:arguments:] + 136
	3   CoreFoundation                      0x028f2fea +[NSException raise:format:] + 58
	4   Foundation                          0x000e685a mutateError + 156
	5   LCL                                 0x0001e1aa -[CJSONScanner scanJSONStringConstant:error:] + 429
	6   LCL                                 0x0001d2ee -[CJSONScanner scanJSONObject:error:] + 789
	7   LCL                                 0x0001d70f -[CJSONScanner scanJSONDictionary:error:] + 903
	8   LCL                                 0x0001d342 -[CJSONScanner scanJSONObject:error:] + 873
	9   LCL                                 0x0001dc31 -[CJSONScanner scanJSONArray:error:] + 354
	10  LCL                                 0x0001d36c -[CJSONScanner scanJSONObject:error:] + 915
	11  LCL                                 0x0001d70f -[CJSONScanner scanJSONDictionary:error:] + 903
	12  LCL                                 0x0001d342 -[CJSONScanner scanJSONObject:error:] + 873
	13  LCL                                 0x0001d70f -[CJSONScanner scanJSONDictionary:error:] + 903
	14  LCL                                 0x0001d342 -[CJSONScanner scanJSONObject:error:] + 873
	15  LCL                                 0x0001d70f -[CJSONScanner scanJSONDictionary:error:] + 903
	16  LCL                                 0x0001d342 -[CJSONScanner scanJSONObject:error:] + 873
	17  LCL                                 0x0001d70f -[CJSONScanner scanJSONDictionary:error:] + 903
	18  LCL                                 0x0001cc7d -[CJSONDeserializer deserializeAsDictionary:error:] + 210


What version of the product are you using? On what operating system?

TouchJSON 1.0.8

Please provide any additional information below.

The JSON provided is parsed without error on http://json.parser.online.fr/

Aug 11, 2010
Project Member #1 jwight
Please update to the latest version of TouchJSON (direct from source control).

This crash no longer exists.
Status: Invalid

Powered by Google Project Hosting