GraphCodec
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
GraphCodec.type
Members list
Value members
Concrete methods
Produces a Graph codec with a JSON where edge ends are represented by the full JSON of N.
Produces a Graph codec with a JSON where edge ends are represented by the full JSON of N.
This codec is the right choice whenever N is a primitive-like type, including all primitive types, String, or any type with a fairly small JSON representation. Further, you might opt for this codec, even if N should be more complex, provided you are NOT concerned about the total length of the JSON. For instance, the resulting verbose edge ends might add value in an educational environment.
Value parameters
- config
-
to be passed to the Graph after JSON decoding. Use
GraphCodec.graphConfigto produce your best-guess configuration. - edgeCodec
-
codec for
E. IfEis a concrete class or an ADT of edges, useJsonCodecMaker.makedirectly. For mixed Graphs with anEbeingAnyEdge[N]or alike, where your concrete edge classes do not build an ADT, refer toEdgeCodec.makePolymorphicWithEmbeddedNodes. - factory
-
to create the Graph from the decoded JSON based on
Iterables of nodes and edges. Typically, you can passGraph.from(_, _)(_)whereGraphis either mutable or immutable. - nodeCodec
-
codec for
N. - onJsonNull
-
is used in case the complete JSON is
null. Either supply a default, usually empty, Graph ornull.asInstanceOf[...]to let thenullcase fail. See also JsonValueCodec.nullValue
Attributes
Inherited methods
Produces an optimal Graph configuration for the purpose of reducing internal memory allocations.
Produces an optimal Graph configuration for the purpose of reducing internal memory allocations.
Value parameters
- degreeHint
-
edge degree with a high percentile.
- orderHint
-
number of nodes in the Graph with a high percentile.
Attributes
- Inherited from:
- GraphCodec (hidden)
Inherited fields
The key of the array of edges in the JSON.
The key of the array of edges in the JSON.
Attributes
- Inherited from:
- GraphCodec (hidden)
The key of the array of nodes in the JSON.
The key of the array of nodes in the JSON.
Attributes
- Inherited from:
- GraphCodec (hidden)