com.google.apps.appmaker.shared.json.JsonException: JSON 不是对象
com.google.apps.appmaker.shared.json.JsonException: JSON is not an object
我有一个计算数据源,它连接了几个 table,使用函数在页面上进行一些冷计算,然后将它们显示在一个大的 table 中。它有一个月份和年份选择器,因为它处理月度发票。每个月都会 return,除了一个。当然,最近的一次(9 月)。 table 设置为不自动加载,因此我不会立即查看整个数据源。通常,一个人会设置月份,设置年份,点击生成,微调器运行几秒钟然后显示。
对于 9 月,它运行了片刻,然后在控制台中显示名义错误 "com.google.apps.appmaker.shared.json.JsonException: JSON is not an object"
我尝试在 where 子句中切换到不同的过滤器,我一直在随机删除数据集中的行,认为这可能是数据问题,因为它适用于我的所有其他数据。也许某处未转义的角色正在弄乱源代码。值得注意的是,我没有做任何我知道的 JSON 操作。
这是数据源的查询
SELECT ParticipantData.VRS_Office as Office,
ServiceData.Participant_Name as Consumer_Name,
ServiceData.Service as Service,
ServiceData.Auth_Number as Auth_Num,
MONTH(ActivityData.Date) as ActivityMonth,
YEAR(ActivityData.Date) as ActivityYear,
Round(SUM(ActivityData.Hours_Used),1) as Hours,
Round(SUM(ActivityData.Mileage_Used),1) as Miles,
ServiceData.ReadyForBilling as ReadyForBilling,
ServiceData.OtherDescription as OtherDescription,
ServiceData.OtherLumpSumAmount as OtherAmount,
ServiceData.Start_Date as Start_Date,
ServiceData.End_Date as End_Date,
ServiceData.InvoicingComplete as InvoicingComplete,
ServiceData.Participant_ID as Participant_ID
FROM (( ActivityData
INNER JOIN ServiceData ON ActivityData.Auth_Number = ServiceData.Auth_Number)
INNER JOIN ParticipantData ON ActivityData.Participant_ID = ParticipantData.Participant_ID)
WHERE MONTH(ActivityData.Date) = :MonthSelector AND YEAR(ActivityData.Date) = :YearSelector
GROUP BY Auth_Num, ActivityMonth, ActivityYear, Office, Consumer_Name, Service, Participant_ID, OtherDescription, OtherAmount, Start_Date, End_Date, InvoicingComplete, ReadyForBilling
ORDER BY Consumer_Name ASC;
数据很敏感,但我可以提供我能提供的信息。最近数据库更改为使用 datetime 而不是 date 作为 sql 字段类型,但我不知道这是不是巧合。
是否有任何我必须注意的特殊字符可能会导致这样的错误?
提供的某些值是在 table 中冷计算的,以根据 table 的比率生成金额。
简而言之,有人在它试图用其进行数学运算的字段中添加了描述。我更正了数据,错误消失了。
我以我认为我可以拥有的最支持的方式到达了它。我随机删除了我设置的 QA 环境中的记录,直到它起作用,然后从那里缩小到一小部分记录。然后它只是发现差异。
经验教训,需要数据验证。
我有一个计算数据源,它连接了几个 table,使用函数在页面上进行一些冷计算,然后将它们显示在一个大的 table 中。它有一个月份和年份选择器,因为它处理月度发票。每个月都会 return,除了一个。当然,最近的一次(9 月)。 table 设置为不自动加载,因此我不会立即查看整个数据源。通常,一个人会设置月份,设置年份,点击生成,微调器运行几秒钟然后显示。
对于 9 月,它运行了片刻,然后在控制台中显示名义错误 "com.google.apps.appmaker.shared.json.JsonException: JSON is not an object"
我尝试在 where 子句中切换到不同的过滤器,我一直在随机删除数据集中的行,认为这可能是数据问题,因为它适用于我的所有其他数据。也许某处未转义的角色正在弄乱源代码。值得注意的是,我没有做任何我知道的 JSON 操作。
这是数据源的查询
SELECT ParticipantData.VRS_Office as Office,
ServiceData.Participant_Name as Consumer_Name,
ServiceData.Service as Service,
ServiceData.Auth_Number as Auth_Num,
MONTH(ActivityData.Date) as ActivityMonth,
YEAR(ActivityData.Date) as ActivityYear,
Round(SUM(ActivityData.Hours_Used),1) as Hours,
Round(SUM(ActivityData.Mileage_Used),1) as Miles,
ServiceData.ReadyForBilling as ReadyForBilling,
ServiceData.OtherDescription as OtherDescription,
ServiceData.OtherLumpSumAmount as OtherAmount,
ServiceData.Start_Date as Start_Date,
ServiceData.End_Date as End_Date,
ServiceData.InvoicingComplete as InvoicingComplete,
ServiceData.Participant_ID as Participant_ID
FROM (( ActivityData
INNER JOIN ServiceData ON ActivityData.Auth_Number = ServiceData.Auth_Number)
INNER JOIN ParticipantData ON ActivityData.Participant_ID = ParticipantData.Participant_ID)
WHERE MONTH(ActivityData.Date) = :MonthSelector AND YEAR(ActivityData.Date) = :YearSelector
GROUP BY Auth_Num, ActivityMonth, ActivityYear, Office, Consumer_Name, Service, Participant_ID, OtherDescription, OtherAmount, Start_Date, End_Date, InvoicingComplete, ReadyForBilling
ORDER BY Consumer_Name ASC;
数据很敏感,但我可以提供我能提供的信息。最近数据库更改为使用 datetime 而不是 date 作为 sql 字段类型,但我不知道这是不是巧合。
是否有任何我必须注意的特殊字符可能会导致这样的错误?
提供的某些值是在 table 中冷计算的,以根据 table 的比率生成金额。
简而言之,有人在它试图用其进行数学运算的字段中添加了描述。我更正了数据,错误消失了。
我以我认为我可以拥有的最支持的方式到达了它。我随机删除了我设置的 QA 环境中的记录,直到它起作用,然后从那里缩小到一小部分记录。然后它只是发现差异。
经验教训,需要数据验证。