diff --git a/AppKit/CPColorPanel.j b/AppKit/CPColorPanel.j index 1dde0cd52..b12829400 100644 --- a/AppKit/CPColorPanel.j +++ b/AppKit/CPColorPanel.j @@ -491,7 +491,7 @@ var CPColorPanelSwatchesCookie = "CPColorPanelSwatchesCookie"; var future = new Date(); future.setYear(2019); - [_swatchCookie setValue: CPJSObjectCreateJSON(result) expires:future domain: nil]; + [_swatchCookie setValue: JSON.stringify(result) expires:future domain: nil]; } - (void)setColorPanel:(CPColorPanel)panel diff --git a/Foundation/CPValue.j b/Foundation/CPValue.j index 69ab9e7a0..377e180ea 100644 --- a/Foundation/CPValue.j +++ b/Foundation/CPValue.j @@ -83,7 +83,7 @@ var CPValueValueKey = @"CPValueValueKey"; self = [super init]; if (self) - _JSObject = CPJSObjectCreateWithJSON([aCoder decodeObjectForKey:CPValueValueKey]); + _JSObject = JSON.parse([aCoder decodeObjectForKey:CPValueValueKey]); return self; } @@ -94,7 +94,7 @@ var CPValueValueKey = @"CPValueValueKey"; */ - (void)encodeWithCoder:(CPCoder)aCoder { - [aCoder encodeObject:CPJSObjectCreateJSON(_JSObject) forKey:CPValueValueKey]; + [aCoder encodeObject:JSON.stringify(_JSObject) forKey:CPValueValueKey]; } @end diff --git a/Tools/bake/main.j b/Tools/bake/main.j index 4c1ee5f63..5a325be9e 100644 --- a/Tools/bake/main.j +++ b/Tools/bake/main.j @@ -28,7 +28,7 @@ function readConfig(configFile) if (!fileData) throw new Error("Couldn't read file: " + configFile); - var configs = CPJSObjectCreateWithJSON(fileData); + var configs = JSON.parse(fileData); return configs; } diff --git a/Tools/press/main.j b/Tools/press/main.j index d54ec4c88..40101945e 100644 --- a/Tools/press/main.j +++ b/Tools/press/main.j @@ -239,7 +239,7 @@ function main() // add fake bundle response bookkeeping applicationJS.push("var __fakeDidReceiveBundleResponse = " + String(fakeDidReceiveBundleResponse)); - applicationJS.push("var __fakeBundleArchives = " + CPJSObjectCreateJSON(bundleArchives) + ";"); + applicationJS.push("var __fakeBundleArchives = " + JSON.stringify(bundleArchives) + ";"); applicationJS.push("for (var i = 0; i < __fakeBundleArchives.length; i++) __fakeDidReceiveBundleResponse(__fakeBundleArchives[i]);") // add each fragment, wrapped in a function, along with OBJJ_CURRENT_BUNDLE bookkeeping