mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-10 17:08:39 +00:00
disable parse with comments now, need improve speed loading for JSONC
This commit is contained in:
parent
651d883672
commit
719a212913
@ -3,7 +3,9 @@ import AppKit
|
||||
|
||||
extension Data {
|
||||
func barItemDefinitions() -> [BarItemDefinition]? {
|
||||
return try? JSONDecoder().decode([BarItemDefinition].self, from: self.utf8string!.stripComments().data(using: .utf8)!)
|
||||
// TODO: Need improve a speed, very low loading JSON with comments ~20sec
|
||||
// return try? JSONDecoder().decode([BarItemDefinition].self, from: self.utf8string!.stripComments().data(using: .utf8)!
|
||||
return try? JSONDecoder().decode([BarItemDefinition].self, from: self)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user