mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-11-02 00:16:07 +00:00
Reformating json
This commit is contained in:
parent
8f9f0fe0c9
commit
6fe3681a32
5 changed files with 43934 additions and 5 deletions
|
|
@ -391,10 +391,14 @@ namespace AideDeJeuCmd
|
||||||
|
|
||||||
private static void SaveJSon<T>(string filename, T objT) where T : class
|
private static void SaveJSon<T>(string filename, T objT) where T : class
|
||||||
{
|
{
|
||||||
|
var settings = new DataContractJsonSerializerSettings { UseSimpleDictionaryFormat = true };
|
||||||
var serializer = new DataContractJsonSerializer(typeof(T));
|
var serializer = new DataContractJsonSerializer(typeof(T));
|
||||||
using (var stream = new FileStream(filename, FileMode.Create))
|
using (var stream = new FileStream(filename, FileMode.Create))
|
||||||
{
|
{
|
||||||
serializer.WriteObject(stream, objT);
|
using (var writer = JsonReaderWriterFactory.CreateJsonWriter(stream, Encoding.UTF8, true, true, " "))
|
||||||
|
{
|
||||||
|
serializer.WriteObject(writer, objT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
14942
Data/monsters_vf.json
14942
Data/monsters_vf.json
File diff suppressed because one or more lines are too long
14949
Data/monsters_vo.json
14949
Data/monsters_vo.json
File diff suppressed because one or more lines are too long
7021
Data/spells_vf.json
7021
Data/spells_vf.json
File diff suppressed because one or more lines are too long
7021
Data/spells_vo.json
7021
Data/spells_vo.json
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue