Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion msgspec/_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -13768,7 +13768,10 @@ static MS_NOINLINE int
json_encode_dict_key_noinline(EncoderState *self, PyObject *obj) {
PyTypeObject *type = Py_TYPE(obj);

if (type == &PyLong_Type) {
if (type == &PyUnicode_Type) {
return json_encode_str(self, obj);
}
else if (type == &PyLong_Type) {
return json_encode_long_as_str(self, obj);
}
else if (type == &PyFloat_Type) {
Expand Down