Skip to content

Instantly share code, notes, and snippets.

@netmilk
Created March 7, 2016 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netmilk/56164d44f8013dc2dd52 to your computer and use it in GitHub Desktop.
Save netmilk/56164d44f8013dc2dd52 to your computer and use it in GitHub Desktop.
MSON Array of arrays of arrays
# MSON Array of arrays of arrays
# GET /polygon
+ Response 200 (application/json)
+ Attributes (Complex Polygon)
+ Body
[[[0, 0], [0, 5], [5, 5], [0, 5], [0, 0]], [[1, 1], [4, 1], [4, 4], [1, 4], [1, 1]]
# Data structures
## Complex Polygon (array[Polygon])
- (Polygon, required) - First list is an enclosing polygon
- (Polygon, optional) - Next ones are cut out areas
# Polygon (array[Point])
Polygon is defined by three or more points
- (Point, required)
- (Point, required)
- (Point, required) - Three points make basic polygon - the triangle
- (Point, optional)
# Sample
- (array)
- (Point)
- 1
- 2
- (Point)
- 3
- 4
- (Point)
- 5
- 6
- (Point)
- 7
- 8
- (Point)
- 9
- 10
## Point (array)
- 100 (number, required) - position on axis X
- 200 (number, required) - position on axis Y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment