You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/09/07 11:37:08 UTC
[3/4] tinkerpop git commit: Removed tabs from GraphSON 2.0 example
Removed tabs from GraphSON 2.0 example
Tabs mess up the asciidoc formatting CTR
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/a3519647
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a3519647
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a3519647
Branch: refs/heads/master
Commit: a351964762dd1424784c3c5c156c4dab7bb9899a
Parents: 84a973c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Sep 7 07:34:37 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Sep 7 07:34:37 2016 -0400
----------------------------------------------------------------------
docs/src/reference/the-graph.asciidoc | 100 ++++++++++++++---------------
1 file changed, 49 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a3519647/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc b/docs/src/reference/the-graph.asciidoc
index c8b6153..42b1a76 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -716,65 +716,63 @@ graph.io(graphson()).writer().mapper(mapper).create().writeVertex(f, g.V(1).next
f.close()
----
-////
Creating a GraphSON 2.0 mapper is done by calling `.version(GraphSONVersion.V2_0)` on the mapper builder. Here's is the
example output from the code above:
[source, json]
----
{
- "@type": "g:Vertex",
- "@value": {
- "id": {
- "@type": "g:Int32",
- "@value": 1
- },
- "label": "person",
- "properties": {
- "name": [{
- "@type": "g:VertexProperty",
- "@value": {
- "id": {
- "@type": "g:Int64",
- "@value": 0
- },
- "value": "marko",
- "label": "name"
- }
- }],
- "uuid": [{
- "@type": "g:VertexProperty",
- "@value": {
- "id": {
- "@type": "g:Int64",
- "@value": 12
- },
- "value": {
- "@type": "g:UUID",
- "@value": "829c7ddb-3831-4687-a872-e25201230cd3"
- },
- "label": "uuid"
- }
- }],
- "age": [{
- "@type": "g:VertexProperty",
- "@value": {
- "id": {
- "@type": "g:Int64",
- "@value": 1
- },
- "value": {
- "@type": "g:Int32",
- "@value": 29
- },
- "label": "age"
- }
- }]
- }
- }
+ "@type": "g:Vertex",
+ "@value": {
+ "id": {
+ "@type": "g:Int32",
+ "@value": 1
+ },
+ "label": "person",
+ "properties": {
+ "name": [{
+ "@type": "g:VertexProperty",
+ "@value": {
+ "id": {
+ "@type": "g:Int64",
+ "@value": 0
+ },
+ "value": "marko",
+ "label": "name"
+ }
+ }],
+ "uuid": [{
+ "@type": "g:VertexProperty",
+ "@value": {
+ "id": {
+ "@type": "g:Int64",
+ "@value": 12
+ },
+ "value": {
+ "@type": "g:UUID",
+ "@value": "829c7ddb-3831-4687-a872-e25201230cd3"
+ },
+ "label": "uuid"
+ }
+ }],
+ "age": [{
+ "@type": "g:VertexProperty",
+ "@value": {
+ "id": {
+ "@type": "g:Int64",
+ "@value": 1
+ },
+ "value": {
+ "@type": "g:Int32",
+ "@value": 29
+ },
+ "label": "age"
+ }
+ }]
+ }
+ }
}
----
-////
Types can be disabled when creating a GraphSON 2.0 `Mapper` with: