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

encoding/json: check that Marshal/Unmarshal have fast paths for string, int, float64 #3949

Closed
gopherbot opened this issue Aug 14, 2012 · 10 comments
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@gopherbot
Copy link

by araddon:

When writing custom UnmarshallJSON functions it would be extremely useful to have access
to the unquote, and unquotebytes functions from decode.go
@remyoudompheng
Copy link
Contributor

Comment 1:

Can't you already get the same result using the following snippet?
var s string
err := json.Unmarshal(quoted_string, &s) 
...

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 2:

Please use Unmarshal.
We should make sure it is not too slow.

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 3:

Labels changed: added go1.1.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 5:

Labels changed: added size-m.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 6:

Labels changed: added suggested.

@gopherbot
Copy link
Author

Comment 7 by rickarnoldjr:

https://golang.org/cl/7068043/

@bradfitz
Copy link
Contributor

Comment 8:

This issue was closed by revision 60abc6b.

Status changed to Fixed.

@rsc
Copy link
Contributor

rsc commented Jan 29, 2013

Comment 9:

Rolling back in CL 7228061: breaks unmarshal of malformed JSON.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Jan 31, 2013

Comment 10:

This issue was closed by revision eea0f19.

Status changed to Fixed.

@rsc
Copy link
Contributor

rsc commented Feb 14, 2013

Comment 11:

This second attempt breaks when custom decoders are used and fail. See issue #4784. Going
to roll this back and mark this working as intended. The existing paths are fast enough.

Status changed to WorkingAsIntended.

@gopherbot gopherbot added workingasintended Suggested Issues that may be good for new contributors looking for work to do. labels Feb 14, 2013
@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

4 participants