[ https://jira.fiware.org/browse/HELP-9091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fernando Lopez updated HELP-9091:
---------------------------------
Description:
Created question in FIWARE Q/A platform on 19-11-2015 at 12:11
{color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/33803291/cant-use-parenthesis-in-an-entitys-attribute-value
+Question:+
Can't use parenthesis ( ) in an entity's attribute value
+Description:+
I've been experimenting with Orion the last few days and and after a while I made it work the way I intended to.
I am facing an unexpected annoyance though, where a string attribute for a given entity context will fail to register.
Example:
http POST [my_orion_server_url]:1026/v1/updateContext < create_push.json
Where create_push.json is:
{
"contextElements": [
{
"type": "Push",
"isPattern": "false",
"id": "Push1",
"attributes": [
{
"name": "message",
"type": "string",
"value": "this is a test)"
}
]
}
],
"updateAction": "APPEND"
}
The server replies with:
HTTP/1.1 200 OK
Content-Length: 129
Content-Type: application/json
Date: Thu, 19 Nov 2015 11:47:03 GMT
{
"errorCode": {
"code": "400",
"details": "Illegal value for JSON field",
"reasonPhrase": "Bad Request"
}
}
If, on the other hand, I remove the parenthesis, everything works as expected:
json file:
{
"contextElements": [
{
"type": "Push",
"isPattern": "false",
"id": "Push1",
"attributes": [
{
"name": "message",
"type": "string",
"value": "this is a test"
}
]
}
],
"updateAction": "APPEND"
}
Server response:
{
"contextResponses": [
{
"contextElement": {
"attributes": [
{
"name": "message",
"type": "string",
"value": ""
}
],
"id": "Push1",
"isPattern": "false",
"type": "Push"
},
"statusCode": {
"code": "200",
"reasonPhrase": "OK"
}
}
]
}
Is this intended or a bug?
I can overcome the issue coding the parenthesis with something else and then decoding on reception, but being able to send a parenthesis straight with the entity would be way smoother and less annoying.
was:
Created question in FIWARE Q/A platform on 19-11-2015 at 12:11
{color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/33803291/cant-use-parenthesis-in-an-entitys-attribute-value
+Question:+
Can't use parenthesis ( ) in an entity's attribute value
+Description:+
I've been experimenting with Orion the last few days and and after a while I made it work the way I intended to.
I am facing an unexpected annoyance though, where a string attribute for a given entity context will fail to register.
Example:
http POST [my_orion_server_url]:1026/v1/updateContext < create_push.json
Where create_push.json is:
{
"contextElements": [
{
"type": "Push",
"isPattern": "false",
"id": "Push1",
"attributes": [
{
"name": "message",
"type": "string",
"value": "this is a test)"
}
]
}
],
"updateAction": "APPEND"
}
The server replies with:
HTTP/1.1 200 OK
Content-Length: 129
Content-Type: application/json
Date: Thu, 19 Nov 2015 11:47:03 GMT
{
"errorCode": {
"code": "400",
"details": "Illegal value for JSON field",
"reasonPhrase": "Bad Request"
}
}
If, on the other hand, I remove the parenthesis, everything works as expected:
json file:
{
"contextElements": [
{
"type": "Push",
"isPattern": "false",
"id": "Push1",
"attributes": [
{
"name": "message",
"type": "string",
"value": "this is a test"
}
]
}
],
"updateAction": "APPEND"
}
Server response:
{
"contextResponses": [
{
"contextElement": {
"attributes": [
{
"name": "message",
"type": "string",
"value": ""
}
],
"id": "Push1",
"isPattern": "false",
"type": "Push"
},
"statusCode": {
"code": "200",
"reasonPhrase": "OK"
}
}
]
}
Is this intended or a bug?
I can overcome the issue coding the parenthesis with something else and then decoding on reception, but being able to send a parenthesis straight with the entity would be way smoother and less annoying.
HD-Enabler: Orion
> [fiware-stackoverflow] Can't use parenthesis ( ) in an entity's attribute value
> ---------------------------------------------------------------------------------------
>
> Key: HELP-9091
> URL: https://jira.fiware.org/browse/HELP-9091
> Project: Help-Desk
> Issue Type: Monitor
> Components: FIWARE-TECH-HELP
> Reporter: Backlog Manager
> Labels: fiware, fiware-orion
>
> Created question in FIWARE Q/A platform on 19-11-2015 at 12:11
> {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/33803291/cant-use-parenthesis-in-an-entitys-attribute-value
> +Question:+
> Can't use parenthesis ( ) in an entity's attribute value
> +Description:+
> I've been experimenting with Orion the last few days and and after a while I made it work the way I intended to.
> I am facing an unexpected annoyance though, where a string attribute for a given entity context will fail to register.
> Example:
> http POST [my_orion_server_url]:1026/v1/updateContext < create_push.json
> Where create_push.json is:
> {
> "contextElements": [
> {
> "type": "Push",
> "isPattern": "false",
> "id": "Push1",
> "attributes": [
> {
> "name": "message",
> "type": "string",
> "value": "this is a test)"
> }
> ]
> }
> ],
> "updateAction": "APPEND"
> }
> The server replies with:
> HTTP/1.1 200 OK
> Content-Length: 129
> Content-Type: application/json
> Date: Thu, 19 Nov 2015 11:47:03 GMT
> {
> "errorCode": {
> "code": "400",
> "details": "Illegal value for JSON field",
> "reasonPhrase": "Bad Request"
> }
> }
> If, on the other hand, I remove the parenthesis, everything works as expected:
> json file:
> {
> "contextElements": [
> {
> "type": "Push",
> "isPattern": "false",
> "id": "Push1",
> "attributes": [
> {
> "name": "message",
> "type": "string",
> "value": "this is a test"
> }
> ]
> }
> ],
> "updateAction": "APPEND"
> }
> Server response:
> {
> "contextResponses": [
> {
> "contextElement": {
> "attributes": [
> {
> "name": "message",
> "type": "string",
> "value": ""
> }
> ],
> "id": "Push1",
> "isPattern": "false",
> "type": "Push"
> },
> "statusCode": {
> "code": "200",
> "reasonPhrase": "OK"
> }
> }
> ]
> }
> Is this intended or a bug?
> I can overcome the issue coding the parenthesis with something else and then decoding on reception, but being able to send a parenthesis straight with the entity would be way smoother and less annoying.
--
This message was sent by Atlassian JIRA
(v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy