Class JsonFiles
java.lang.Object
lv.id.jc.dicechess.runtime.JsonFiles
Loads a JSON object of string keys to string values from a file — the shape an opening book,
or any similarly simple lookup table, is exported as.
-
Method Summary
Modifier and TypeMethodDescriptionloadStringMap(Path path) Loadspathas a JSON object of string to string.
-
Method Details
-
loadStringMap
Loadspathas a JSON object of string to string.- Parameters:
path- the file to load- Returns:
- the parsed map, or an empty map if
pathdoes not exist - Throws:
UncheckedIOException- ifpathexists but cannot be readIllegalArgumentException- ifpath's content is not a JSON object of strings
-