Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
epoberezkin
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
epoberezkin
10y ago
Thank you. One use case that's already working is an express middleware - allows you to bold on JSONScript on existing express ap in a single line of code. Another is a proxy to manage batch processing across multiple services - going
32.
▲
by
epoberezkin
10y ago
Thank you. YAML will look more like plain text and still will be easy to parse.
33.
▲
by
epoberezkin
10y ago
Re '$', there is no expectation on the location of the script instructions in the object structure, unlike JSON RPC. So it is used to differentiate instructions from simple data structures that can be part of the script.
34.
▲
by
epoberezkin
10y ago
Thanks for the comparison. JSON-RPC allows simple batching but it doesn't allow any server side logic between calls. Individual calls to external instructions in JSONScript are indeed similar. The full syntax can be used if you need to
35.
▲
by
epoberezkin
10y ago
I've seen several XML based scripting implementations. This one for example: http://www.drdobbs.com/web-development/jelly-an-xml-based-sc... I may have got used to the syntax I came up with, but all XML based scri
36.
▲
by
epoberezkin
10y ago
It's out of stock - https://www.amazon.co.uk/Service-Oriented-Architecture-Conce... Joking aside, why do you think it is any more untestable than any other batch endpoint out there? The concerns you are listing are all
37.
▲
by
epoberezkin
10y ago
Lol. Thanks for the suggestion about presenting it, I need to think about it. "A niche between individual endpoints and completely new way of doing things, batching without new abstraction" - seems like a good way to position it i
38.
▲
by
epoberezkin
10y ago
Indeed :) Self- documented is always better. Unfortunately, it's easy to add though :)
39.
▲
by
epoberezkin
10y ago
It's funny that I've always been annoyed myself that I need to click around to find the language sample all the time, and yet I've put all the examples on the Langauge page ( http://www.json-script.com/language
40.
▲
by
epoberezkin
10y ago
Yes, this feeling happens quite often indeed :)
41.
▲
by
epoberezkin
10y ago
Many people use YAML instead of JSON by the way - a bit fewer characters.
42.
▲
by
epoberezkin
10y ago
Redis's implementation of Lua is extremely limited, and even then there is no easy way to validate the script apart from sending to the server. JSONScript can be simply validated against the JSON-schema, no execution is required to che
43.
▲
by
epoberezkin
10y ago
That's good to know that it was done before with JSON, I've only seen XML attempts. It probably shows that there is a need, doesn't it? Syntax is a matter of opinion, JSONScript seems more concise than REL in the link.
44.
▲
by
epoberezkin
10y ago
I also prefer writing code to DSLs etc. Unfortunately, just writing code doesn't solve the problems mentioned here: https://github.com/JSONScript/jsonscript#problem Sending code in some existing general purpose or
45.
▲
by
epoberezkin
10y ago
Interesting. I saw GraphQL; I thought that given that it's query language it won't have this problem... Although if you'd exposed SQL it would have been super easy to kill the server. I am about to start using JSONScript for
46.
▲
by
epoberezkin
10y ago
I'm working on it now. Any questions and feedback are very much appreciated.
47.
▲
by
epoberezkin
10y ago
That is indeed a valid concern. I thought about an option to limit the evaluation time and the memory used. Although I don't think it's possible at the moment to request something that would cause an endless loop. There are no loo
48.
▲
by
epoberezkin
10y ago
You can use it via the middleware for Express to implement advanced batch processing in a single line of code. https://github.com/JSONScript/jsonscript-express
49.
▲
Show HN: JSONScript – Asynchronous scripting language using JSON format
(json-script.com)
49 points
by
epoberezkin
10y ago
|
47 comments
50.
▲
by
epoberezkin
11y ago
Supported keywords: switch, constant, contains, patternGroups, formatMaximum/formatMinimum and exclusiveFormatMaximum/exclusiveFormatMinimum. It also supports creating custom validation keywords.
51.
▲
Show HN: The fastest JSON-schema validator Ajv now supports version 5 keywords
(github.com)
1 points
by
epoberezkin
11y ago
|
1 comments
52.
▲
by
epoberezkin
11y ago
It's 1.6 times faster than the second place (is-my-json-valid) according to this benchmark: https://github.com/ebdrup/json-schema-benchmark
53.
▲
Show HN: JSON-Schema validator Ajv – the fastest and the most compliant
(github.com)
4 points
by
epoberezkin
11y ago
|
1 comments
54.
▲
by
epoberezkin
11y ago
The benchmark: https://github.com/ebdrup/json-schema-benchmark
55.
▲
Show HN: The new fastest JSON Schema validator – ajv
(github.com)
1 points
by
epoberezkin
11y ago
|
1 comments
56.
▲
by
epoberezkin
11y ago
All json-schema validators have very different interfaces. Now switching between them is easy.
57.
▲
Show HN: Node.js adapter for 11 json-schema validators
(github.com)
1 points
by
epoberezkin
11y ago
|
1 comments
58.
▲
by
epoberezkin
14y ago
I created live feed for our site using socket.io just today and was thinking whether to use it without WebSockets or install another proxy in front of nginx. So this 1.3.13 release is quite a surprising coincidence. Now I'm thinking how "s