Force JSONEncoder output formatting with .sortedKeys
This commit is contained in:
parent
756de4f1de
commit
6a5acec9df
@ -67,7 +67,7 @@ struct ParsedImage {
|
|||||||
|
|
||||||
func generateContentJson(isVector: Bool) -> String? {
|
func generateContentJson(isVector: Bool) -> String? {
|
||||||
let encoder = JSONEncoder()
|
let encoder = JSONEncoder()
|
||||||
encoder.outputFormatting = .prettyPrinted
|
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
|
||||||
|
|
||||||
let imageContent = generateImageContent(isVector: isVector)
|
let imageContent = generateImageContent(isVector: isVector)
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ enum StringsFileGenerator {
|
|||||||
static func generateXcStringsFileContentFromRootObject(rootObject: Root) -> String {
|
static func generateXcStringsFileContentFromRootObject(rootObject: Root) -> String {
|
||||||
do {
|
do {
|
||||||
let encoder = JSONEncoder()
|
let encoder = JSONEncoder()
|
||||||
encoder.outputFormatting = [.prettyPrinted]
|
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
|
||||||
|
|
||||||
let json = try encoder.encode(rootObject)
|
let json = try encoder.encode(rootObject)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user