Save json data under key.

Only JsonObject and JsonArray are allowed in a json file. Use store_object or store_array instead.

Property definitions

json $ JsonStore :: store_json
	# Save `json` data under `key`.
	#
	# Only `JsonObject` and `JsonArray` are allowed in a json file.
	# Use `store_object` or `store_array` instead.
	private fun store_json(key: String, json: Serializable) do
		var path = "{store_dir}/{key}.json".simplify_path
		path.dirname.mkdir
		var file = new FileWriter.open(path)
		file.write(json.to_json)
		file.close
	end
lib/json/store.nit:127,2--137,4