public static void Main()
string jsonInput = "{\"sign\": \"XXX\", \"a\": 1.10, \"c\": 32.120, \"b\": 13.00}";
string sortedJson = SortJsonExcludeSign(jsonInput);
Console.WriteLine(sortedJson);
public static string SortJsonExcludeSign(string json)
using JsonDocument doc = JsonDocument.Parse(json);
var dictionary = doc.RootElement
.Where(x => x.Name != "sign")
.ToDictionary(x => x.Name, x => x.Value.GetRawText());
var sortedDictionary = dictionary.OrderBy(kvp => kvp.Key);
var jsonElements = sortedDictionary.Select(kvp => $"\"{kvp.Key}\":{kvp.Value}");
return $"{{{string.Join(",", jsonElements)}}}";