Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Chapter:Data
-
HD-Enabler:Orion
Description
Created question in FIWARE Q/A platform on 14-04-2015 at 15:04
Please, ANSWER this question AT https://stackoverflow.com/questions/29628587/no-json-object-could-be-decoded-orion-context-broker
Question:
No JSON object could be decoded- orion context broker
Description:
I am trying out orion context broker comunication on two CentOS 6.6 machines. On the target machine I did:
./accumulator-server.py 1028 /accumulate mywebpage.lan on
And on my local machine I did:
[DevF12@localhost ~]$ (curl mywebpage.lan:1028/v1/updateContext s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -d @ | python -mjson.tool ) <<EOF
> {
> "contextElements": [
> {
> "type": "Room",
> "isPattern": "false",
> "id": "Room2",
> "attributes": [
>
,
>
> ]
> }
> ],
> "updateAction": "APPEND"
> }
> EOF
The result on the target machine is:
POST http://mywebpage.lan:1028/v1/updateContext
Content-Length: 456
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Host: mywebpage.lan:1028
Accept: application/json
Content-Type: application/json
{ "contextElements": [ { "type": "Room", "isPattern": "false", "id": "Room2", "attributes": [
{ "name": "temperature", "type": "float", "value": "777" },
{ "name": "pressure", "type": "integer", "value": "711" }] } ], "updateAction": "APPEND"}=======================================
192.168.1.11 - - [14/Apr/2015 15:07:36] "POST /v1/updateContext HTTP/1.1" 200 -
And the message I get from the local machine is:
No JSON object could be decoded
So, what does this all mean?
1. Is the 200 code saying that it is successfully creating Room2?
2. Why am I getting the could not decode JSON then?
3. All of this brings up another question, does this mean that the weather station described in my previous post also has to run on CentOS in order to send context broker messages?
Activity
- All
- Comments
- History
- Activity
- Transitions