Show More
@@ -31,9 +31,6 b' from .utils import (' | |||||
31 | urlerr = util.urlerr |
|
31 | urlerr = util.urlerr | |
32 | urlreq = util.urlreq |
|
32 | urlreq = util.urlreq | |
33 |
|
33 | |||
34 | if pycompat.ispy3: |
|
|||
35 | long = int |
|
|||
36 |
|
||||
37 | # filters are callables like: |
|
34 | # filters are callables like: | |
38 | # fn(obj) |
|
35 | # fn(obj) | |
39 | # with: |
|
36 | # with: | |
@@ -329,7 +326,7 b' def json(obj, paranoid=True):' | |||||
329 | return b'false' |
|
326 | return b'false' | |
330 | elif obj is True: |
|
327 | elif obj is True: | |
331 | return b'true' |
|
328 | return b'true' | |
332 | elif isinstance(obj, (int, long, float)): |
|
329 | elif isinstance(obj, (int, pycompat.long, float)): | |
333 | return pycompat.bytestr(obj) |
|
330 | return pycompat.bytestr(obj) | |
334 | elif isinstance(obj, bytes): |
|
331 | elif isinstance(obj, bytes): | |
335 | return b'"%s"' % encoding.jsonescape(obj, paranoid=paranoid) |
|
332 | return b'"%s"' % encoding.jsonescape(obj, paranoid=paranoid) |
General Comments 0
You need to be logged in to leave comments.
Login now