tracker issue : CF-3042828

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 85125:create a struct

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): Mike Causer / Mike Causer (mike causer)

Created: 11/21/2010

Components: Language, Functions

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 9,0,1,274733 /

Priority/Frequency: Major / Unknown

Locale/System: English / Platforms All

Vote Count: 0

Problem:

create a struct.add an international phone number with leading '+'. eg "+61299887766"serialise the structdeserialise the structthrows
Method:

// create a struct with a phone numbertest = structNew()test.phone = "+61299887766";// convert it to a stringstring = serializeJSON( test );// string == {"PHONE":+61299887766}// fail. its treating the string with leading plus as a number and not wrapping with quotes// convert it back to a structtest2 = deserializeJSON( string );// throws JSON parsing failure at character 10:'+'the same string, with quotes around it, can be successfully deserialized.if i put a space after the '+' before i serializeJSON(), it correctly serializes as a string wrapped in quotes.
Result:

JSON parsing failure at character 10:'+' in {"PHONE":+61299887766}

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3042828

External Customer Info:
External Company:  
External Customer Name: Mike Causer
External Customer Email: 5E3754C04462CDFF992016B6
External Test Config: 11/21/2010

Attachments:

Comments: