Код: Выделить всё
private TreeModel dataTree = new DefaultTreeModel(catTreeNodeRoot);Код: Выделить всё
String jsonString = (new Gson()).toJson(dataTree);Подробнее здесь: https://stackoverflow.com/questions/791 ... rk-to-json
Код: Выделить всё
private TreeModel dataTree = new DefaultTreeModel(catTreeNodeRoot);Код: Выделить всё
String jsonString = (new Gson()).toJson(dataTree);