Packagecom.godpaper.as3.serialization
Classpublic final class PGN
InheritancePGN Inheritance Object

This class provides encoding and decoding of the PGN format. Example usage: // create a PGN string from an internal object PGN.encode( myObject ); // read a PGN string into an internal object var myObject:Object = PGN.decode( pgnString );

See also

http://www.xqbase.com/protocol/cchess_pgn.htm
http://www.xqbase.com/protocol/pgnfen1.htm


Public Methods
 MethodDefined By
  
decode(s:String, strict:Boolean = true):*
[static] Decodes a PGN string into a native object.
PGN
  
encode(o:Object):String
[static] Encodes a object into a PGN string.
PGN
Method Detail
decode()method
public static function decode(s:String, strict:Boolean = true):*

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9.0

Decodes a PGN string into a native object.

Parameters

s:String — The PGN string representing the object
 
strict:Boolean (default = true) — Flag indicating if the decoder should strictly adhere to the PGN standard or not. The default of true throws errors if the format does not match the PGN syntax exactly. Pass false to allow for non-properly-formatted PGN strings to be decoded with more leniancy.

Returns
* — A native object as specified by s
encode()method 
public static function encode(o:Object):String

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9.0

Encodes a object into a PGN string.

Parameters

o:Object — The object to create a PGN string for

Returns
String — the PGN string representing o