/*
 * CPString_Base64.j
 *
 * Created by Philippe Laval on 2009/03/19.
 * Copyright 2009 Philippe Laval. All rights reserved.
 */

@import <Foundation/CPObject.j>

// This is needed in cappucinno 0.6 and will be incorporated in next release
@implementation CPString (JSON)
 
// Returns a string representing the supplied JavaScript object encoded as JSON.
+ (CPString)JSONFromObject:(JSObject)anObject
{
    return CPJSObjectCreateJSON(anObject);
}
 
// Returns a JavaScript object decoded from the string's JSON representation.
- (JSObject)objectFromJSON
{
    return CPJSObjectCreateWithJSON(self);
}
 
@end