【发布时间】:2013-09-08 16:33:49
【问题描述】:
使用 Backbone / Marionette 开发专有 CRM 应用程序,我想知道,Backbone 对其 JSON 的期望结构是什么?这是我目前正在使用的,但我可以将其更改为最适合的方式。 (如果可能,我想避免设置自定义解析函数。)
{
"rowCount":"1",
"records":[
{
"objectName":"",
"User_UserID":"",
"User_EmailAddress":"",
"User_Password":"",
"User_EncPassword":"",
"User_Premium":"",
"User_FirstName":"",
"User_LastName":"",
"User_Honorific":"",
"User_Title":"",
"User_Nickname":"",
"User_ParentCompany":"",
"User_Company":"",
"User_Publication":"",
"User_Website":"",
"User_ShipAddress1":"",
"User_ShipAddress2":"",
"User_ShipAddress3":"",
"User_ShipCity":"",
"User_ShipState":"",
"User_ShipCountry":"",
"User_ShipZip":"",
"User_BillCompany":"",
"User_BillFirstName":"",
"User_BillLastName":"",
"User_BillAddress1":"",
"User_BillAddress2":"",
"User_BillAddress3":"",
"User_BillCity":"",
"User_BillState":"",
"User_BillCountry":"",
"User_BillZip":"",
"User_PhoneNo":"",
"User_FaxNo":"",
"User_HomeNo":"",
"User_MobileNo":"",
"User_OtherNo1":"",
"User_OtherNo2":"",
"User_IChat_Aim":"",
"User_IChat_Gchat":"",
"User_IChat_MSN":"",
"User_IChat_Etc":"",
"User_CreateIPAddress":"",
"User_CreateDate":"",
"User_ViewDate":"",
"User_ModifyDate":"",
"User_ConvertDate":"",
"User_LastMailedDate":"",
"User_LastACSCheckDate":"",
"User_CCType":"",
"User_CCNo":"",
"User_LoggendBy":"",
"User_ContactVia":"",
"User_Source":"",
"User_RelatedAssistant":"",
"User_Specialties":"",
"User_JobType":"",
"User_CompanyType":"",
"User_TaxID":"",
"User_Notes":"",
"User_TermsExtended":"",
"User_AcsAdvice":"",
"User_MailList":"",
"User_EMailList":"",
"User_PressList":"",
"User_CustomList":"",
"User_HolidayList":"",
"User_VIPList":"",
"User_MarketingBlacklist":"",
"User_SalesBlacklist":"",
"User_IsCustomer":"",
"User_Answer1":"",
"User_Answer2":"",
"User_Answer3":"",
"User_Answer4":"",
"User_Answer5":"",
"User_NewPassword":"",
"User_OldPassword":"",
"User_FMUserID":"",
"User_FMUser":"",
"User_BetaUser":"",
"User_ShowFeatures":"",
"User_TermsVersion":"",
"User_TOSVersion":"",
"User_TOSDate":"",
"User_TOSIP":"",
"User_TOSLastVersion":"",
"User_TOSLastDate":"",
"User_TOSLastIP":"",
"User_LoginDate":"",
"User_LoginIPAddress":"",
"User_FMName":"",
"User_NameSuffix":"",
"User_FaxLabel":"",
"User_OtherNo1Label":"",
"User_OtherNo2Label":"",
"User_EmailAddressAlternate":"",
"User_LoggedBy":"",
"User_IsObsolete":"",
"User_AddressSame":"",
"User_UserDate":"",
"User_DeferredPay":"",
"User_TaxExempt":"",
"User_TaxExemptID":"",
"User_Saved":"",
"User_Status":"",
"User_Migrated":""
}
]
}
【问题讨论】:
-
“格式化”是什么意思?
-
ideal是什么意思,有效的 JSON 是理想的。 -
@Pointy - 只是 JSON 的格式。
-
您使用“格式”一词来解释“格式”的含义。 JSON 解析器完全忽略标记之间的空白。
-
@limelights — 好吧,在我上面的示例中,最好将
records设为根元素,像这样吗? hastebin.com/jalaxonuja.ini
标签: javascript json backbone.js marionette