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

Comments

Projects
None yet
4 participants
@gopherbot
Copy link

commented Aug 14, 2012

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

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2012

Comment 1:

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Sep 12, 2012

Comment 3:

Labels changed: added go1.1.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 10, 2012

Comment 5:

Labels changed: added size-m.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 10, 2012

Comment 6:

Labels changed: added suggested.

@gopherbot

This comment has been minimized.

Copy link
Author

commented Jan 5, 2013

Comment 7 by rickarnoldjr:

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

This comment has been minimized.

Copy link
Member

commented Jan 11, 2013

Comment 8:

This issue was closed by revision 60abc6b.

Status changed to Fixed.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jan 29, 2013

Comment 9:

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

Status changed to Accepted.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jan 31, 2013

Comment 10:

This issue was closed by revision eea0f19.

Status changed to Fixed.

@rsc

This comment has been minimized.

Copy link
Contributor

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.

@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.
You can’t perform that action at this time.