Table of Contents

Interface IJsonFile

Namespace
Nautilus.Json.Interfaces
Assembly
Nautilus.dll
A simple interface for a JSON file framework.
public interface IJsonFile
Extension Methods

Properties

AlwaysIncludedJsonConverters

The Newtonsoft.Json.JsonConverters that should always be used when reading/writing JSON data.
[JsonIgnore]
JsonConverter[] AlwaysIncludedJsonConverters { get; }

Property Value

JsonConverter[]

JsonFilePath

The file path at which the JSON file is accessible for reading and writing.
[JsonIgnore]
string JsonFilePath { get; }

Property Value

string

Methods

Load(bool)

A method for loading the JSON properties from disk.
void Load(bool createFileIfNotExist = true)

Parameters

createFileIfNotExist bool
Whether a new JSON file should be created with default values if it does not already exist.
See Also

LoadWithConverters(bool, params JsonConverter[])

A method for loading the JSON properties from disk.
void LoadWithConverters(bool createFileIfNotExist = true, params JsonConverter[] jsonConverters)

Parameters

createFileIfNotExist bool
Whether a new JSON file should be created with default values if it does not already exist.
jsonConverters JsonConverter[]
Optional Newtonsoft.Json.JsonConverters to be used for deserialization.
See Also

Save()

A method for saving the JSON properties to disk.
void Save()
See Also

SaveWithConverters(params JsonConverter[])

A method for saving the JSON properties to disk.
void SaveWithConverters(params JsonConverter[] jsonConverters)

Parameters

jsonConverters JsonConverter[]
Optional Newtonsoft.Json.JsonConverters to be used for serialization.
See Also