{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Support for data types that JSON default encoder does not do."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "This includes:"
            }
          ]
        },
        {
          "__type": "Blockquote",
          "__tag": 4059,
          "children": [
            {
              "__type": "BulletList",
              "__tag": 4053,
              "ordered": false,
              "start": 1,
              "children": [
                {
                  "__type": "ListItem",
                  "__tag": 4054,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Numpy array or number"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "ListItem",
                  "__tag": 4054,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Complex number"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "ListItem",
                  "__tag": 4054,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Set"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "ListItem",
                  "__tag": 4054,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Bytes"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "ListItem",
                  "__tag": 4054,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "astropy.UnitBase"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "ListItem",
                  "__tag": 4054,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "astropy.Quantity"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "/astropy/utils/misc.py",
  "item_line": 366,
  "item_type": "class",
  "aliases": [
    "astropy.utils.JsonCustomEncoder"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import json\nimport numpy as np\nfrom astropy.utils.misc import JsonCustomEncoder\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "json.dumps(np.arange(3), cls=JsonCustomEncoder)\n",
        "execution_status": "unexpected_exception",
        "out": "Traceback (most recent call last):\n  File \"<doctest astropy.utils.misc:JsonCustomEncoder[0]>\", line 1, in <module>\n    json.dumps(np.arange(3), cls=JsonCustomEncoder)\n    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/json/__init__.py\", line 242, in dumps\n    **kw).encode(obj)\n          ~~~~~~^^^^^\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/json/encoder.py\", line 202, in encode\n    chunks = self.iterencode(o, _one_shot=True)\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/json/encoder.py\", line 263, in iterencode\n    return _iterencode(o, 0)\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/astropy/utils/misc.py\", line 392, in default\n    from astropy import units as u\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/astropy/units/__init__.py\", line 13, in <module>\n    from . import (\n    ...<11 lines>...\n    )\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/astropy/units/astrophys.py\", line 12, in <module>\n    from astropy.constants import si as _si\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/astropy/constants/__init__.py\", line 27, in <module>\n    from . import cgs, si\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/astropy/constants/cgs.py\", line 7, in <module>\n    from .config import codata, iaudata\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/astropy/constants/config.py\", line 15, in <module>\n    codata = importlib.import_module(\".constants.\" + phys_version, \"astropy\")\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/importlib/__init__.py\", line 88, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/astropy/constants/codata2018.py\", line 9, in <module>\n    from .constant import Constant, EMConstant\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/astropy/constants/constant.py\", line 11, in <module>\n    from astropy.units.quantity import Quantity\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/astropy/units/quantity.py\", line 28, in <module>\n    from .quantity_helper import can_have_arbitrary_unit, check_output, converters_and_unit\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/astropy/units/quantity_helper/__init__.py\", line 16, in <module>\n    from . import erfa, function_helpers, helpers, scipy_special\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/astropy/units/quantity_helper/function_helpers.py\", line 1239, in <module>\n    @function_helper  # np.in1d deprecated in not NUMPY_LT_2_0.\n     ^^^^^^^^^^^^^^^\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/astropy/units/quantity_helper/function_helpers.py\", line 197, in __call__\n    helps = getattr(module, f.__name__)\n  File \"/opt/hostedtoolcache/Python/3.14.5/x64/lib/python3.14/site-packages/numpy/__init__.py\", line 792, in __getattr__\n    raise AttributeError(f\"module {__name__!r} has no attribute {attr!r}\")\nAttributeError: module 'numpy' has no attribute 'in1d'. Did you mean: 'int16'?\n"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "skipkeys",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "False"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "ensure_ascii",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "True"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "check_circular",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "True"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "allow_nan",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "True"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "sort_keys",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "False"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "indent",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "separators",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "default",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "None"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "JsonCustomEncoder"
  },
  "references": null,
  "qa": "astropy.utils.misc:JsonCustomEncoder",
  "arbitrary": [],
  "local_refs": []
}