summaryrefslogtreecommitdiffstatshomepage
path: root/py/objnone.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objnone.c')
-rw-r--r--py/objnone.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/py/objnone.c b/py/objnone.c
index a8d6071435..01536dcb34 100644
--- a/py/objnone.c
+++ b/py/objnone.c
@@ -38,7 +38,11 @@ typedef struct _mp_obj_none_t {
} mp_obj_none_t;
STATIC void none_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) {
- print(env, "None");
+ if (MICROPY_PY_UJSON && kind == PRINT_JSON) {
+ print(env, "null");
+ } else {
+ print(env, "None");
+ }
}
STATIC mp_obj_t none_unary_op(mp_uint_t op, mp_obj_t o_in) {