icubilla / jsonexserializer

Automatically exported from code.google.com/p/jsonexserializer
0 stars 0 forks source link

Support for Enums #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add support for serializing Enums.
An option should be given to output the Enum as text (its name), or as its
value.
For string JSON mode the value will be the default output type.

Example
class SomeClass {
  public PropertyType ObjectType{ get { ... } set { ... } }
}

Serialized Text in name mode:
{
   "ObjectType": PropertyType.Object
}

   or

Serialized Text in value mode:
{
   "ObjectType": 2
}

Original issue reported on code.google.com by elliott....@gmail.com on 1 Jun 2007 at 12:12

GoogleCodeExporter commented 9 years ago
Support finished for this.  Decided to just serialize as int with no option 
setting.
 Need to add a test for Enum with [Flags] attribute.

Original comment by elliott....@gmail.com on 4 Jun 2007 at 1:22

GoogleCodeExporter commented 9 years ago

Original comment by elliott....@gmail.com on 10 Jul 2008 at 5:01