Fix namespaced-json compiler not preserving numeric values. Fixes #28

This commit is contained in:
Kim Biesbjerg
2017-03-29 12:52:14 +02:00
parent 7654397bb3
commit ff1c91010e
3 changed files with 14 additions and 2 deletions

View File

@@ -8,7 +8,9 @@ export class NamespacedJsonCompiler implements CompilerInterface {
public extension = 'json';
public compile(collection: TranslationCollection): string {
const values: {} = flat.unflatten(collection.values);
const values: {} = flat.unflatten(collection.values, {
object: true
});
return JSON.stringify(values, null, '\t');
}