Skip to content

Commit

Permalink
more compatibility fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzStefaner committed Nov 5, 2010
1 parent 52da375 commit ba6b34f
Showing 1 changed file with 17 additions and 27 deletions.
44 changes: 17 additions & 27 deletions flare/lib/com/adobe/serialization/json/JSON.as
Expand Up @@ -31,10 +31,8 @@ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package com.adobe.serialization.json {

*/
package com.adobe.serialization.json {
/**
* This class provides encoding and decoding of the JSON format.
*
Expand All @@ -46,11 +44,9 @@ package com.adobe.serialization.json {
* // read a JSON string into an internal object
* var myObject:Object = JSON.decode( jsonString );
* </code>
* @private
*/
public class JSON {


* @private
*/
public class JSON {
/**
* Encodes a object into a JSON string.
*
Expand All @@ -59,14 +55,12 @@ package com.adobe.serialization.json {
* @langversion ActionScript 3.0
* @playerversion Flash 8.5
* @tiptext
*/
public static function encode( o:Object ):String {

var encoder:JSONEncoder = new JSONEncoder( o );
return encoder.getString();

}

*/
public static function encode(o : Object) : String {
var encoder : JSONEncoder = new JSONEncoder(o);
return encoder.getString();
}

/**
* Decodes a JSON string into a native object.
*
Expand All @@ -76,14 +70,10 @@ package com.adobe.serialization.json {
* @langversion ActionScript 3.0
* @playerversion Flash 8.5
* @tiptext
*/
public static function decode( s:String ):Object {

var decoder:JSONDecoder = new JSONDecoder( s )
return decoder.getObject();

}

}

*/
public static function decode(s : String) : Object {
var decoder : JSONDecoder = new JSONDecoder(s);
return decoder.getValue();
}
}
}

0 comments on commit ba6b34f

Please sign in to comment.