diff --git a/sleap/skeleton.py b/sleap/skeleton.py index c405dc883..fbd1b909c 100644 --- a/sleap/skeleton.py +++ b/sleap/skeleton.py @@ -18,7 +18,6 @@ import attr import cattr import h5py -import jsonpickle import networkx as nx import numpy as np from networkx.readwrite import json_graph @@ -1496,7 +1495,7 @@ def to_json(self, node_to_idx: Optional[Dict[Node, int]] = None) -> str: Returns: A string containing the JSON representation of the skeleton. """ - jsonpickle.set_encoder_options("simplejson", sort_keys=True, indent=4) + if node_to_idx is not None: # Map Nodes to int indexed_node_graph = nx.relabel_nodes(G=self._graph, mapping=node_to_idx)