当我更改输入按钮以在我调用我的Web服务返回JSON的页面上输入提交按钮时,我发现了一个区别。为按钮返回的JSON是正确的,因为提交返回一个额外的随机字符串,这给了我一个解析错误。
这是我在提交时收到的JSON作为回复。
**jQuery1640658714344437076_1394552371285**
({"Addresses":[{"AddressDeliveryInstallation":" ","AddressExtras":" ","AddressHouseNumber":"115","AddressKey":"14850471315","AddressLine1":"115 Ithaca Rd","AddressLine2":" ","AddressLockBox":" ","AddressPostDirection":" ","AddressPreDirection":" ","AddressPrivateMailboxName":" ","AddressPrivateMailboxRange":" ","AddressRouteService":" ","AddressStreetName":"Ithaca","AddressStreetSuffix":"Rd","AddressSuiteName":" ","AddressSuiteNumber":" ","AddressTypeCode":"S","AreaCode":"607","CBSACode":"27060","CBSADivisionCode":" ","CBSADivisionLevel":" ","CBSADivisionTitle":" ","CBSALevel":"Metropolitan Statistical Area","CBSATitle":"Ithaca, NY","CarrierRoute":"C029","CensusBlock":"5010","CensusTract":"001300","City":"Ithaca","CityAbbreviation":"Ithaca","CompanyName":" ","CongressionalDistrict":"23","CountryCode":"US","CountryName":"United States of America","CountyFIPS":"36109","CountyName":"Tompkins","DeliveryIndicator":"R","DeliveryPointCheckDigit":"1","DeliveryPointCode":"15","DomainName":" ","EmailAddress":" ","Gender":"M","Gender2":" ","Latitude":"42.438395","Longitude":"-76.480396","MailboxName":" ","NameFirst":"Mark","NameFirst2":" ","NameFull":"Mark Lorentzen","NameLast":"Lorentzen","NameLast2":" ","NameMiddle":" ","NameMiddle2":" ","NamePrefix":" ","NamePrefix2":" ","NameSuffix":" ","NameSuffix2":" ","NewAreaCode":" ","PhoneExtension":" ","PhoneNumber":"6072218953 ","PhonePrefix":"221","PhoneSuffix":"8953","PlaceCode":"3638077","PlaceName":"Ithaca","PostalCode":"14850-4713","RecordExtras":" ","RecordID":"1","Reserved":" ","Results":"AC02,AC03,AS01,DA10,DA30,GS05,NS01,NS05,NS06,PS02,PS07,VR01,VR04","Salutation":"Mr. Lorentzen","State":"NY","StateName":"New York","TopLevelDomain":" ","UTC":"-05:00","UrbanizationName":" "}],"Message":"AC02: State Change;AC03: City Change;AS01: Address matched to postal database;DA10: Name appended;DA30: Phone appended;GS05: Geocoded to rooftop level;PS02: Phone number matched to 7 digit level;PS07: Phone number on a cellular line;VR01: Individual name and address match;VR04: Address and phone match;","Success":true});
P.S。我没有发布任何代码,因为我知道代码没有导致这个。如果您认为可以提供帮助,我会发布它。谢谢。
答案 0 :(得分:0)
为我的问题找到了解决方法。解析我的JSON以忽略jquery标记字符串。