Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to-json() to comply with newest JSON spec #5043

Closed
p6rt opened this issue Jan 12, 2016 · 6 comments
Closed

to-json() to comply with newest JSON spec #5043

p6rt opened this issue Jan 12, 2016 · 6 comments
Labels
RFC Request For Comments

Comments

@p6rt
Copy link

p6rt commented Jan 12, 2016

Migrated from rt.perl.org#127252 (status was 'rejected')

Searchable as RT127252$

@p6rt
Copy link
Author

p6rt commented Jan 12, 2016

From @zoffixznet

The newest JSON spec—contrary to previous versions—does allow non-object/array things at the top level. Reference​: http://rfc7159.net/rfc7159#rfc.section.2 (second paragraph, especially).

Rakudo's from-json built-in, however, displays an error when attempting to decode JSON conforming to this newest spec​:

<Zoffix> m​: say from-json "42"
<camelia> rakudo-moar 5ed58f​: OUTPUT«Invalid JSON​: 42␤ in block <unit> at /tmp/r522Mw8UZf line 1␤␤»
<Zoffix> m​: say from-json "false"
<camelia> rakudo-moar 5ed58f​: OUTPUT«Invalid JSON​: false␤ in block <unit> at /tmp/eCGN9CXVDB line 1␤␤»
<Zoffix> m​: say from-json '"42"'
<camelia> rakudo-moar 5ed58f​: OUTPUT«Invalid JSON​: "42"␤ in block <unit> at /tmp/kfesR2DMMW line 1␤␤»

@p6rt
Copy link
Author

p6rt commented Jan 21, 2016

From @zoffixznet

Made a PR fixing this​: rakudo/rakudo#687

@p6rt
Copy link
Author

p6rt commented May 10, 2016

From @coke

On Thu Jan 21 08​:34​:04 2016, cpan@​zoffix.com wrote​:

Made a PR fixing this​: rakudo/rakudo#687

There's a competing request to hide from-json and to-json (though I cannot find the discussion now).

If we hide the functions so they are only available to rakudo internals, then we don't need to worry about this.

--
Will "Coke" Coleda

1 similar comment
@p6rt
Copy link
Author

p6rt commented May 10, 2016

From @coke

On Thu Jan 21 08​:34​:04 2016, cpan@​zoffix.com wrote​:

Made a PR fixing this​: rakudo/rakudo#687

There's a competing request to hide from-json and to-json (though I cannot find the discussion now).

If we hide the functions so they are only available to rakudo internals, then we don't need to worry about this.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jun 17, 2016

From @zoffixznet

The functions in question are now internal, so the RFC is irrelevant. Closing.

@p6rt
Copy link
Author

p6rt commented Jun 17, 2016

@zoffixznet - Status changed from 'new' to 'rejected'

@p6rt p6rt closed this as completed Jun 17, 2016
@p6rt p6rt added the RFC Request For Comments label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request For Comments
Projects
None yet
Development

No branches or pull requests

1 participant