0

Hi I'm currently working an integrating ODK aggregate (Z-Alpha JSON Server) in django project. I can get the content from request.body. I have tried to convert the response into Json its getting error. can any one help me to get the data from the request.body content.

content is :

{
token: "testauthtoken",
content: "record",
formId: "maintenance_ct",
formVersion: "",
data: [
{
*meta-instance-id*: "uuid:cddde2cc-54e6-43e3-8b48-f96446a5a42e",
*meta-model-version*: null,
*meta-ui-version*: null,
*meta-submission-date*: "2016-08-08T09:01:46.000Z",
*meta-is-complete*: true,
*meta-date-marked-as-complete*: "2016-08-08T09:01:46.000Z",
survey_start: "2016-08-08T08:49:26.000Z",
tech_name: "Re",
install_date: "2016-08-08T08:49:00.000Z",
vvdnId: "036000291452",
state: "ca",
city: "los_angeles",
issueId: [
"brkn_sensor"
],

img_test: {
bytes: "/9j/4TB...",
filename: "1470646207454.jpg",
type: "image/jpeg"
},
survey_end: "2016-08-08T08:50:24.000Z",
instanceID: "uuid:cddde2cc-54e6-43e3-8b48-f96446a5a42e"
}
]
}

1 Answers1

0

If you're using the XForm format and the OpenRosa submission API (ie. submitting data with ODK Collect or Enketo), it might be helpful to look at the sel-columbia/formhub, or onaio/onadata or kobotoolbox/kobocat code. Those are all Django projects that follow this form format and these APIs.

If you're looking at using ODK Survey (aka ODK 2.0), ignore everything I just wrote. (I have no idea about that form format and submission API.)

Martijn van de Rijdt
  • 1,020
  • 3
  • 10
  • 16
  • Thank you, I'm create form in open source odk https://opendatakit.org/ , and i select the Z-Alpha JSON Server for getting the response in JSON. I can get the response in request.body but the json can't decode , when i tried its throwing error. –  Aug 10 '16 at 03:12
  • 1
    Ah ok. Sorry, I misunderstood. I have no knowledge about this. – Martijn van de Rijdt Aug 10 '16 at 15:04