gonum: gonum.org/v1/gonum/graph/formats/sigmajs Index | Files

package sigmajs

import "gonum.org/v1/gonum/graph/formats/sigmajs"

Package sigmajs implements marshaling and unmarshaling of Sigma.js JSON documents.

See http://sigmajs.org/ for Sigma.js documentation.

Index

Package Files

sigmajs.go

type Edge Uses

type Edge struct {
    ID         string
    Source     string
    Target     string
    Attributes map[string]interface{}
}

Edge is a Sigma.js edge.

func (*Edge) MarshalJSON Uses

func (e *Edge) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Edge) UnmarshalJSON Uses

func (e *Edge) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type Graph Uses

type Graph struct {
    Nodes []Node `json:"nodes"`
    Edges []Edge `json:"edges"`
}

Graph is a Sigma.js graph.

type Node Uses

type Node struct {
    ID         string
    Attributes map[string]interface{}
}

Node is a Sigma.js node.

func (*Node) MarshalJSON Uses

func (n *Node) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Node) UnmarshalJSON Uses

func (n *Node) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

Package sigmajs imports 3 packages (graph) and is imported by 1 packages. Updated 2019-01-30. Refresh now. Tools for package owners.