You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vxquery.apache.org by "Christina Pavlopoulou (JIRA)" <ji...@apache.org> on 2016/08/25 22:17:20 UTC
[jira] [Resolved] (VXQUERY-222) Json Serialization
[ https://issues.apache.org/jira/browse/VXQUERY-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christina Pavlopoulou resolved VXQUERY-222.
-------------------------------------------
Resolution: Fixed
> Json Serialization
> ------------------
>
> Key: VXQUERY-222
> URL: https://issues.apache.org/jira/browse/VXQUERY-222
> Project: VXQuery
> Issue Type: Bug
> Reporter: Christina Pavlopoulou
> Assignee: Riyafa Abdul Hameed
>
> I tried to run the following query:
> let $collection := "vxquery-xtest/src/test/resources/TestSources/ghcnd"
> for $r in collection($collection)/dataCollection/data
> return {
> "date": data($r/date),
> "datatype": data($r/dataType),
> "station": data($r/station),
> "attributes": ",,",
> "value": data($r/value)
> }
> The result I got was not serialized correctly since the values of the object were without quotes.
> This is the result I get:
> {noformat}
> {"date":2004-04-04T00:00:00.000,"datatype":PRCP,"station":GHCND:US000000004,"attributes":",,","value":40}
> {"date":2004-04-04T00:00:00.000,"datatype":PRCP,"station":GHCND:US000000004,"attributes":",,","value":40}
> {"date":2004-04-04T00:00:00.000,"datatype":PRCP,"station":GHCND:US000000004,"attributes":",,","value":40}
> {"date":2004-04-04T00:00:00.000,"datatype":PRCP,"station":GHCND:US000000004,"attributes":",,","value":40}
> {"date":2004-04-04T00:00:00.000,"datatype":PRCP,"station":GHCND:US000000004,"attributes":",,","value":40}
> {"date":2004-04-04T00:00:00.000,"datatype":PRCP,"station":GHCND:US000000004,"attributes":",,","value":40}
> {"date":2004-04-04T00:00:00.000,"datatype":PRCP,"station":GHCND:US000000004,"attributes":",,","value":40}
> {"date":2004-04-04T00:00:00.000,"datatype":PRCP,"station":GHCND:US000000004,"attributes":",,","value":40}
> {"date":2004-04-04T00:00:00.000,"datatype":PRCP,"station":GHCND:US000000004,"attributes":",,","value":40}
> {"date":2004-04-04T00:00:00.000,"datatype":PRCP,"station":GHCND:US000000004,"attributes":",,","value":40}
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)