icubilla / jsonexserializer

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

an exception when read xml config #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create Serializer by follow configs
  <JsonExSerializer>
    <IsCompact>false</IsCompact>
    <OutputTypeComment>false</OutputTypeComment>
    <OutputTypeInformation>false</OutputTypeInformation>
    <ReferenceWritingType>WriteIdentifier</ReferenceWritingType>
    <TypeConverters>
      <add type="System.DateTime" converter="TestProject1.DateTimeConvert, TestProject1" />
      <add type="TestProject1.Employe, TestProject1" property="Birth" converter="TestProject1.DateTimeConvert, TestProject1" />
    </TypeConverters>
    <IgnoreProperties>
      <add type="TestProject1.Employe, TestProject1" property="Guid" />
    </IgnoreProperties>
  </JsonExSerializer>

thorw an exception:
Test method TestProject1.ClassTest.TestMethod1 threw exception:  
System.Exception: Error configuring serializer from config section 
JsonExSerializer. 
Unrecognized element IgnoreProperties within TypeConverters tag --->  
System.ArgumentException: Unrecognized element IgnoreProperties within 
TypeConverters tag.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
I am use the version 3.1.0.267, on windows 7, .Net framework 3.5.

Please provide any additional information below.
modify this XmlConfig.cs line 305 to:
         if (reader.NodeType == XmlNodeType.Element)  // old code: if (reader.IsStartElement())
can solve this problem.

Original issue reported on code.google.com by wx1...@gmail.com on 28 Apr 2010 at 8:56

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r276.

Original comment by elliott....@gmail.com on 8 May 2010 at 1:56

GoogleCodeExporter commented 9 years ago
Download the latest build 3.1.0.269 to get the fix.

Original comment by elliott....@gmail.com on 8 May 2010 at 3:08

GoogleCodeExporter commented 9 years ago

Original comment by elliott....@gmail.com on 8 May 2010 at 3:10