Closed jordonbiondo closed 7 years ago
Objects with circular references display (collapsed) on these references rather than displaying a representation of the circular relationship.
(collapsed)
Consider using a library like ciruclar-json or something else to handle these cases.
ciruclar-json
Consider the following output below:
Using fmt-obj on an object with a circular reference: Note that object.b.z points back to the root object, and object.d points to .b.c.e
fmt-obj
object.b.z
object.d
.b.c.e
a: 3 b: x: 10 z: (collapsed) c: (collapsed) d: foo: "bar"
Using prettyjson and circular-json together on the same object:
prettyjson
circular-json
a: 3 b: x: 10 z: ~ c: e: foo: bar d: ~b~c~e
Added in 1.3.0 :sparkles: :
1.3.0
Objects with circular references display
(collapsed)
on these references rather than displaying a representation of the circular relationship.Consider using a library like
ciruclar-json
or something else to handle these cases.Consider the following output below:
Using
fmt-obj
on an object with a circular reference: Note thatobject.b.z
points back to the root object, andobject.d
points to.b.c.e
Using
prettyjson
andcircular-json
together on the same object: