JuliaIO / JSON.jl

JSON parsing and printing
Other
313 stars 101 forks source link

JSON.parsefile does not read entire file #316

Closed jakewilliami closed 3 years ago

jakewilliami commented 3 years ago

Hi, I haven't done very much debugging yet sorry, but I am trying to read this file, but it is reading two fewer elements than is in the file.

KristofferC commented 3 years ago

You have duplicated dictionary keys, for example "CSS".

jakewilliami commented 3 years ago

@KristofferC I noticed that after submitting the issue, sorry. This means there is only one element missing.

I am having trouble finding the culprit, but here are the obtained keys from the JSON file, using respectively JSON and LazyJSON:

json = ["JAVA", "C", "PERL", "JULIA", "AWK", "NORM", "ITRED", "ASSEMBLY", "SED", "OBJECTIVEC", "BRED", "BATCHFILE", "YACC", "OBJECTIVECPP", "CPP", "TEX", "RUST", "SHELL", "ITYELLOW", "GO", "DULL", "SCHEME", "DARKBBLUE", "PHP", "COMMONLISP", "LISP", "CSS", "SMPL", "HASKELL", "CSHARP", "PYTHON", "LEX", "EMACSLISP", "ELIXIR", "TEXT", "COFFEESCRIPT", "ULINE", "IT", "POWERSHELL", "D", "BGREEN", "FSHARP", "LUA", "DTRACE", "OCAML", "FLASHING", "MARKDOWN", "CUDA", "ERLANG", "MAKEFILE", "BWHITE", "SWIFT", "JAVASCRIPT", "TYPESCRIPT", "ITWHITE", "RUBY", "MATLAB", "BYELLOW", "HTML", "ROFF", "BBLUE", "R"]

lazyjson = ["BGREEN", "ULINE", "IT", "DULL", "FLASHING", "BWHITE", "ITWHITE", "BYELLOW", "ITYELLOW", "BRED", "ITRED", "BBLUE", "DARKBBLUE", "NORM", "JULIA", "PYTHON", "JAVA", "RUST", "HASKELL", "SHELL", "PERL", "RUBY", "ELIXIR", "COMMONLISP", "LISP", "EMACSLISP", "LUA", "C", "CPP", "CSHARP", "R", "JAVASCRIPT", "BATCHFILE", "TEX", "TEXT", "MARKDOWN", "OBJECTIVEC", "ASSEMBLY", "ROFF", "MAKEFILE", "SWIFT", "YACC", "DTRACE", "AWK", "SMPL", "SED", "LEX", "D", "COFFEESCRIPT", "ERLANG", "HTML", "GO", "SCHEME", "TYPESCRIPT", "POWERSHELL", "PHP", "DTRACE", "CSS", "FSHARP", "MATLAB", "CUDA", "OCAML", "OBJECTIVECPP"]
jakewilliami commented 3 years ago

Ohh, I think I have another duplicate entry: "DTRACE". Sorry about this guys...