Skip to content

Conversation

@r0fls
Copy link
Contributor

@r0fls r0fls commented Nov 20, 2016

No description provided.

def dumps(self, value):
return json.dumps(_tag(value), separators=(',', ':'))

LOADS_MAP = {

This comment was marked as off-topic.

This comment was marked as off-topic.

' u': uuid.UUID,
' b': b64decode,
' m': Markup,
' d': parse_date

This comment was marked as off-topic.

This comment was marked as off-topic.

' b': b64decode,
' m': Markup,
' d': parse_date,
}

This comment was marked as off-topic.

This comment was marked as off-topic.

@davidism
Copy link
Member

Haven't looked at it in a while, but make sure this is in line with #1452.

elif the_key == ' d':
return parse_date(the_value)
# Check the key for a corresponding function
return_function = self.LOADS_MAP.get(the_key, None)

This comment was marked as off-topic.

This comment was marked as off-topic.

@r0fls
Copy link
Contributor Author

r0fls commented Nov 22, 2016

This does appear to be made obsolete by #1452, thanks @davidism. However that PR has been open for a year and a half, so this simple change might make sense while we're waiting for that to be approved. I'll leave that decision to the discretion of those with merge rights though.

@RonnyPfannschmidt
Copy link
Contributor

@davidism at first glance #1452 looks like a over-generalization with quite a performance penalty :/

@untitaker untitaker merged commit 0e79aba into pallets:master Dec 21, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants