
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
NOTE: PREVIEW VERSION OF NEXT RELEASE
A JSON parser for JavaScript that isn't strict. Also, it's very very extensible.
a:1,foo:bar
→ {"a": 1, "foo": "bar"}
Site | Docs | FP Guide | Contributing | Wiki | Code of Conduct | Twitter | Chat
Install:
> npm install jsonic
Node.js:
const Jsonic = require('jsonic')
console.log(Jsonic('a:b')) // prints {a:'b'}
TypeScript:
import { Jsonic } from 'jsonic'
console.log(Jsonic('a:b')) // prints {a:'b'}
Browser:
<script src="jsonic.min.js"></script>
<script>
console.log(Jsonic('a:b')) // prints {a:'b'}
</script>
(Although in the real world you'll probably be packaging jsonic as a dependency with webpack or similar.)
All of the examples below parse beautifully to {"a": 1, "b": "B"}
.
short and sweet
a:1,b:B
no commas, no problem
a:1
b:B
comments are cool
a:1
// a:2
# a:3
/* b wants
* to B
*/
b:B
strings and things
{ "a": 100e-2, '\u0062':`\x42`, }
The syntax of jsonic is just easy-going JSON:
{a:1}
→ {"a": 1}
a:1,b:2
→ {"a": 1, "b": 2}
, a,b
→ ["a", "b"]
a:1,b:2,
→ {"a": 1, "b": 2}
, a,b,
→ ["a", "b"]
1e1 === 0xa === 0o12 === 0b1010
But that is not all! Oh, no. That is not all...
This:
# Merge, baby, merge!
cat: { hat: true }
cat: { fish: null }
cat: who: ['sally', 'me']
# Who needs quotes anyway?
holds up: [
cup and a cake,
`TWO books!
the fish!`,
'''
ship!
dish!
ball!
'''
]
}
parses into this:
{
"cat": {
"hat": true,
"fish": null,
"who": ["sally","me"]
},
"holds up": [
"cup and a cake",
"TWO books!\n the fish!",
"ship!\ndish!\nball!"
]
}
Meaning you also get:
'a',"b"
→ ['a', 'b']
{a: cup cake }
→ {"a": "cup cake"}
a:{b:1},a:{c:2}
→ {"a": {"b": 1, "c": 2}}
a:b:1,a:c:2
→ {"a": {"b": 1, "c": 2}}
`a
b`
→ "a\nb"
'''
a
b
'''
→ "a\nb"
And we haven't even begun to talk about all the fun stuff you can do with options and plugins, including support for multiple files, CSV (or TSV), and dynamic content.
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
FAQs
A dynamic JSON parser that isn't strict and can be customized.
The npm package jsonic receives a total of 23,365 weekly downloads. As such, jsonic popularity was classified as popular.
We found that jsonic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.