https://github.com/dnutiu/firebaseresttranslator
Helper class used to translate C# dictionaries into Firebase Rest format
https://github.com/dnutiu/firebaseresttranslator
Last synced: 4 months ago
JSON representation
Helper class used to translate C# dictionaries into Firebase Rest format
- Host: GitHub
- URL: https://github.com/dnutiu/firebaseresttranslator
- Owner: dnutiu
- License: apache-2.0
- Created: 2020-03-07T14:20:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-30T13:03:17.000Z (about 5 years ago)
- Last Synced: 2024-12-30T20:51:56.894Z (over 1 year ago)
- Language: C#
- Size: 13.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# FirebaseRestTranslator
[](https://circleci.com/gh/dnutiu/FirebaseRestTranslator)
This is a small helper class that can be used to translate C#
dictionaries into the Firebase REST format so they be posted
to Firebase directly.
See the tests for usage.
```c#
[Fact]
public void Test_FirebaseTranslator_BoolValue()
{
var data = new Dictionary()
{
["myKey"] = false
};
var expectedJson = "{\"name\":\"Test_FirebaseTranslator\",\"fields\":{\"myKey\":{\"booleanValue\":false}}}";
var result = Translator.Translate("Test_FirebaseTranslator", data);
var actualJson = JsonConvert.SerializeObject(result);
Assert.Equal(expectedJson, actualJson);
}
```
# Changelog
### 0.1.2
- Added support for uint, long types.