feat(RES-35): Force JSONEncoder output formatting with .sortedKeys (#15)
All checks were successful
gitea-openium/resgen.swift/pipeline/head This commit looks good

Reviewed-on: #15
This commit is contained in:
Thibaut Schmitt 2025-05-05 10:07:58 +02:00
parent 756de4f1de
commit ccda606af5
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ struct ParsedImage {
func generateContentJson(isVector: Bool) -> String? {
let encoder = JSONEncoder()
encoder.outputFormatting = .prettyPrinted
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
let imageContent = generateImageContent(isVector: isVector)

View File

@ -150,7 +150,7 @@ enum StringsFileGenerator {
static func generateXcStringsFileContentFromRootObject(rootObject: Root) -> String {
do {
let encoder = JSONEncoder()
encoder.outputFormatting = [.prettyPrinted]
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
let json = try encoder.encode(rootObject)