On 2018-05-20 05:48, Hikaru Nakashima wrote:
Sorry for lack of words.
What I am talking about is a new proposal to modify `JSON.parse()`.
Then I understand :-)
I'm not entirely convinced that this is a workable approach because it breaks
if you don't use a reviver but I leave that to the ES
On Sat, May 19, 2018 at 8:48 PM, Hikaru Nakashima
wrote:
> Sorry for lack of words.
> What I am talking about is a new proposal to modify `JSON.parse()`.
>
There is json5 (json5.org; github.com/json5/json5; npmjs.com/package/json5)
or I would entertain such things for
Sorry for lack of words.
What I am talking about is a new proposal to modify `JSON.parse()`.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
On 2018-05-20 05:25, Hikaru Nakashima wrote:
I would like to be called and interpreted like
`BigInt("465456456465465465465465464646")` when first parsing the numeric
string.
This means that all numerical values passed to the `reviver` function and all
numerical values contained in the
I would like to be called and interpreted like
`BigInt("465456456465465465465465464646")` when first parsing the numeric
string.
This means that all numerical values passed to the `reviver` function and
all numerical values contained in the post-analysis object are `BigInt`.
To me, what you're actually seeking to discuss looks less related to physics
and more like an extension to ECMAScript's `import` syntax.
Would you please describe it a little more? A good conversation starter,
preferably without any domain-specific context (i.e. physics), would entail:
- the
jsol files can be seen as distilled Reductions which are confluent and semi
well-founded.
--
Abdul S.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
What exactly are you proposing? Do you have a userland library that
implements whatever you're proposing? Why are the states of matter in any
way relevant to a programming language?
On Sat, May 19, 2018 at 6:12 PM, Abdul Shabazz
wrote:
>
> Of the five (5) known forms of
Of the five (5) known forms of matter:
1. Solid (well-structured arrangement of tightly bound atoms, found in
ice)
2. Liquid (unstructured arrangement of tightly-bound atoms)
3. Gas (loose arrangement of atoms)
4. Plasma (Properties of liquid, electricity, and magnetism found @
perhaps http://array.build
On Sat, May 19, 2018 at 1:26 AM, Cyril Auburtin
wrote:
> pro: I think it's quite frequent to need `Array.from({length: .. }, () =>
> ...)`
> con: you can't generate dynamic data (like an array of random values)
>
> I think in the end this
Hey Kai, you’re oversimplifying. Your solution works for a single Unicode
symbol (corresponding to a single code point) but falls apart as soon as
you need to match multiple symbols of possibly varying length, like in the
`escapeHtml` example.
On Sat, May 19, 2018 at 8:43 AM, kai zhu
On 2018-05-19 14:48, Hikaru Nakashima wrote:
Is it better to be able to pass the option object as the second argument like
this?
```
let option = { number: BigInt, reviver: conversion_function }
JSON.parse( json_string, option )
```
All JSON numbers are interpreted as follows
```
Is it better to be able to pass the option object as the second argument
like this?
```
let option = { number: BigInt, reviver: conversion_function }
JSON.parse( json_string, option )
```
All JSON numbers are interpreted as follows
```
option.number( number_string )
```
again, you backend-engineers are making something more complicated than needs
be, when simple, throwaway glue-code will suffice. agree with jordan, this
feature is a needless cross-cut of String.prototype.replace.
```
/*jslint
node: true
*/
'use strict';
var dict;
dict = {
'$': '^',
My 2 cents.
For classes with a reachable namespace from the window / global and
serializable arguments, you could use an ad-hoc structure to define complex
values:
```js
// the converter
const toJSONStruct = value =>
Object.defineProperty(
{
"arguments": Symbol.iterator in value ?
pro: I think it's quite frequent to need `Array.from({length: .. }, () =>
...)`
con: you can't generate dynamic data (like an array of random values)
I think in the end this `Array.prototype.repeat` is not a good idea, but
there should be something easier/less verbose than `Array.from({length:
You can also have a
```js
var replacer = replacements => {
const re = new RegExp(replacements.map(([k,_,escaped=k]) =>
escaped).join('|'), 'gu');
const replaceMap = new Map(replacements);
return s => s.replace(re, w => replaceMap.get(w));
}
var replace = replacer([['$', '^',
Here's what I'd prefer instead: overload `String.prototype.replace` to
take non-callable objects, as sugar for this:
```js
const old = Function.call.bind(Function.call, String.prototype.replace)
String.prototype.replace = function (regexp, object) {
if (object == null && regexp != null &&
Trying again...
It turned out that the Oracle/Java JSON API actually is I-JSON compatible by default
through a method which I have coined "Adaptive Notation":
{
"BigDecimal.large": "1E+999",
"BigDecimal.small": 1,
"BigInteger.large": "240777489003222785532321",
"BigInteger.small":
19 matches
Mail list logo