Giter VIP home page Giter VIP logo

delphijson's People

Contributors

sivv avatar

delphijson's Issues

Array create raise an exception

Hi, 

I'm trying to create a JSON like this:
{
"NotasPedido" :[
{"IdNotaPedido":1, "Estatus":1},
{"IdNotaPedido":2, "Estatus":2}
]
}

j. NotasPedido[0]. IdNotaPedido := 11; 
j. NotasPedido[0]. Estatus:= 21;
but it raises an exception, is this a bug or I'm doing something wrong. 
Regards, 

Al



Original issue reported on code.google.com by [email protected] on 7 Oct 2013 at 7:50

invalid property value parsing hue light json

What steps will reproduce the problem?
1. The json string below comes from philips hue light's API. and raises a weird 
exception "invalid property value". I can't figure what causes this.

JSON:
{"lights":{"1":{"state": 
{"on":true,"bri":6,"hue":10,"sat":149,"xy":[0.5532,0.3447],"ct":500,"alert":"non
e","effect":"none","colormode":"hs","reachable":true}, "type": "Extended color 
light", 
"name": "L1", "modelid": "LCT001", "swversion": "65003148", "pointsymbol": { 
"1":"none", "2":"none", "3":"none", "4":"none", "5":"none", "6":"none", 
"7":"none", "8":"none" }},"2":{"state": 
{"on":true,"bri":97,"hue":42810,"sat":253,"xy":[0.2160,0.1364],"ct":500,"alert":
"none","effect":"none","colormode":"hs","reachable":true}, "type": "Extended 
color light", "name": "L2", "modelid": 
"LCT001", "swversion": "65003148", "pointsymbol": { "1":"none", "2":"none", 
"3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" 
}},"3":{"state": 
{"on":true,"bri":58,"hue":50453,"sat":193,"xy":[0.2884,0.1598],"ct":153,"alert":
"none","effect":"none","colormode":"hs","reachable":true}, "type": "Extended 
color light", "name": "L3", "modelid": 
"LCT001", "swversion": "65003148", "pointsymbol": { "1":"none", "2":"none", 
"3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" 
}},"4":{"state": 
{"on":true,"bri":151,"hue":23002,"sat":253,"xy":[0.4358,0.4976],"ct":331,"alert"
:"none","effect":"none","colormode":"hs","reachable":true}, "type": "Extended 
color light", "name": "L4", "modelid": 
"LCT001", "swversion": "65003148", "pointsymbol": { "1":"none", "2":"none", 
"3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" 
}},"5":{"state": 
{"on":true,"bri":140,"hue":15974,"sat":250,"xy":[0.5070,0.4432],"ct":455,"alert"
:"none","effect":"none","colormode":"hs","reachable":true}, "type": "Extended 
color light", "name": "L5", "modelid": 
"LCT001", "swversion": "65003148", "pointsymbol": { "1":"none", "2":"none", 
"3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" 
}},"6":{"state": 
{"on":true,"bri":55,"hue":14922,"sat":144,"xy":[0.4595,0.4105],"ct":156,"alert":
"none","effect":"none","colormode":"ct","reachable":true}, "type": "Extended 
color light", "name": "L6", "modelid": 
"LCT001", "swversion": "65003148", "pointsymbol": { "1":"none", "2":"none", 
"3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" 
}},"7":{"state": 
{"on":true,"bri":55,"hue":31999,"sat":189,"xy":[0.3533,0.3694],"ct":156,"alert":
"none","effect":"none","colormode":"ct","reachable":true}, "type": "Extended 
color light", "name": "L7", 
"modelid": "LCT001", "swversion": "65003148", "pointsymbol": { "1":"none", 
"2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", 
"8":"none" }},"8":{"state": 
{"on":true,"bri":55,"hue":34495,"sat":232,"xy":[0.3151,0.3252],"ct":155,"alert":
"none","effect":"none","colormode":"ct","reachable":true}, "type": "Extended 
color light", "name": "L8", 
"modelid": "LCT001", "swversion": "65003148", "pointsymbol": { "1":"none", 
"2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", 
"8":"none" }},"9":{"state": 
{"on":true,"bri":55,"hue":15609,"sat":113,"xy":[0.4393,0.4056],"ct":156,"alert":
"none","effect":"none","colormode":"ct","reachable":true}, "type": "Extended 
color light", "name": "L9", 
"modelid": "LCT001", "swversion": "65003148", "pointsymbol": { "1":"none", 
"2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", 
"8":"none" }}},"groups":{},"config":{"name": 
"LMhue","mac": "00:17:88:0a:2c:3e","dhcp": true,"ipaddress": 
"192.168.1.108","netmask": "255.255.255.0","gateway": 
"192.168.1.1","proxyaddress": "none","proxyport": 0,"UTC": 
"2013-02-20T19:32:53","whitelist":{"ffffffffee30c715ffffffffdc8b4853":{"last 
use date": "2013-02-20T19:24:33","create date": "2013-02-13T14:29:48","name": 
"HTC One 
V"},"786f96d1be5fe272266902910cc1043":{"last use date": 
"1987-01-06T22:53:35","create date": "2013-02-13T16:33:29","name": 
"Illhueminate"},"h":{"last 
use date": "2013-02-20T19:32:53","create date": "2013-02-13T19:08:49","name": 
"h"}},"swversion": 
"01003542","swupdate":{"updatestate":0,"url":"","text":"","notify": 
false},"linkbutton": false,"portalservices": true},"schedules":{}}



Original issue reported on code.google.com by [email protected] on 20 Feb 2013 at 7:52

json string

What is the expected output? What do you see instead?

json string:
string/asda/dddd 

and i see

 \\\\\\\/asda\\\\\\/ddddd


the fix: SetStringValue function -> change Decode to ENCODE and GetStringValue 
-> change ENCODE to Decode!

someone had to be sleepy :(

Original issue reported on code.google.com by [email protected] on 28 Jun 2013 at 3:09

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.