Code Monkey home page Code Monkey logo

jsonparser's People

Contributors

koldev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsonparser's Issues

Parsing the Json with Ssjs and Amp script code

I want to parse the JSON Input in AMPSCript code using Guide Template Language in Email Template. I have tried using AMPSCript code:

var @JSON
set @JSON =
'{
"ArticleCount":22,
"Articles":[
{
"ArticleAbstractTeaser":null,
"ArticleActiveDate":null,
"Authors":[
{
"AuthorTypeId":1,
"CorrespondenceInformation":null
}
],
"Blurb":null,
"CmeUrls":[

],
"Links":[
{
"Description":null,
"LinkType":"jumplink"
},
{
"Description":null,
"LinkType":"figure"
},
{
"Description":"null",
"LinkType":"figure"
}
],
"Ordinal":0,
"PdfOnlyMessage":"",
"Topics":[
{
"Score":0,
"Topic":"ISSUE @ A GLANCE"
}
],
"UserHasAccess":false,
"VideoMultimediaUrlResponse":null
}
]
}'

{{.datasource JSONVar type=variable maxrows=20}}
{{.data}}
{ "target" : "@JSON" }
{{/data}}

ArticleCount: {{ArticleCount}}

{{.datasource Articles type=nested maxrows=20}}
{{.data}}
{ "target" : "JsonVar.Articles" }
{{/data}}

ArticleAbstractTeaser: {{ArticleAbstractTeaser}}

ArticleActiveDate: {{ArticleActiveDate}}

{{.datasource Authors type=nested maxrows=20}}
{{.data}}
{ "target" : "Articles.Authors" }
{{/data}}
{{/datasource}}

{{/datasource}}

{{/datasource}}
But it is not working, please anyone help me for JSON Parsing.

Special character parsing incomplete

Function String_ fills in internal SpecChar, but doesn't append it to the result.

This means that escaped backslashes simply won't appear for example. After the case, the function needs a Result := Result + SpecChar for parsing to work correctly;

JsonParser.pas: Unrecognized parameter name "type" Compile aborted.

Hello, i'm trying to compile a test installer just to test processing of a json file, but while running the command "ISCC.exe json.example.installer.iss" i'm getting the error "JsonParser.pas: Unrecognized parameter name "type" Compile aborted." and i don´t know what exactly am i doing wrong. Not an expert on InnoSetup nor PascalScript. Can you point me to the right direction please?
json.example.installer.iss.txt

Inconsistent parsing of arrays within json

I am calling this library from Inno Setup 6.0.2
The following json string result in memory access violations for me:

'{ "a": {"b": [ ] }, "d": "e"}'

I was able to fix this by making the following changes to the Value function:

Line 287:

var
  N: Integer;
  O: TJsonObject;
  A: TJsonArray;

Line 324:

A := Array_(JsonParser, @Value);  
JsonParser.Output.Arrays[N] :=  A;  

Line 333:

O := Object_(JsonParser, @Value);
JsonParser.Output.Objects[N] := O;

@koldev Could you confirm this problem and fix?

Error Parsing JSON with UTF-8 BOM

Json parsing with UTF-8 encoding works fine with Identifier 65001.

But fails when the JSON file's encoding is UTF-8 with BOM.

Can anyone help me how to go ahead with UTF-8 with BOM encoding or do I need to use any other identifier rather than 65001.

Thanks

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.