Back to the validator

Directory

The OpenSpace directory is a JSON containing a list of hackerspaces that have implemented the Space API. This directory can be loaded by any web and mobile application by requesting the resource http://openspace.slopjong.de/directory.json

If your space is missing go back to the validator page and click on New Space. Your JSON will be checked against the specification. If there are no errors it'll be added after you confirmed that you're not a bot.

The directory also offers a preselection feature for those applications that rely on certain fields that must be present in a Space API JSON. As a showing example a video application is only interested in such JSONs which have the stream field. There are many other use cases where the preselection makes life easier.

To use the preselection append ?filter= to the directory URL and specify a filter which stands for a JSON field. Nested fields are concatenated with a dot e.g. sensors.barometer.value corresponds to the following nested JSON structure:

{
  "sensors":[
    "barometer":[
      "value" : 23
    ]									
  ]
}
If you wrote an app for monitoring the temperature you would be interested in all the spaces' JSON providing temperature sensor data. You'd get the preselection with http://openspace.slopjong.de/directory.json?filter=sensors.barometer.value

The filters can also be combined as shown below.

Filters

Combining Filters

Filters can be combined as shown in the following examples.

Disjunction

Get all the space JSONs which include the contact or feeds field.
or( contact , feeds )
Try directory.json?filter=or(contact,feeds)

Conjunction

Get all the space JSONs which include the contact.irc and contact.phone field.
and( contact.irc , contact.phone )
Try directory.json?filter=and(contact.irc,contact.phone)

Mixed

Get all the space JSONs which include the fields as follows:

and( contact , feeds , or( sensors , stream ) )
Try directory.json?filter=and(contact,feeds,or(sensors,stream))

Back to the validator
 

Results Loading


					
					

FAQ


What is OpenSpaceLint?

OpenSpaceLint is a validator and reformatter for JSON and checks if the spaceapi was correctly implemented.

What are some common errors?
Expecting 'STRING'
You probably have an extra comma at the end of your collection. Something like: { "a": "b", }
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
You probably have an extra comma at the end of your list. Something like: [ "a", "b", ]
You also may have not enclosed your collection keys in quotes. Proper format for a collection is: { "key": "value" }

Be sure to follow JSON's syntax properly. For example, always use double quotes, always quotify your keys, and remove all callback functions.

A friend and I pasted the same JSON in and got different results. Wat do?

If you and your friend are on different systems (Win/Unix), this is possible due to the way windows handles newlines. Essentially, if you have just newline characters (\n) in your JSON and paste it into JSONLint from a windows machine, it can validate it as valid erroneously since Windows may need a carriage return (\r) as well to detect newlines properly.

The solution: Either use direct URL input, or make sure your content's newlines match the architecture your system expects!