@@ -1255,9 +1255,11 @@ class PocoJsonSerializerStrategy : IJsonSerializerStrategy
12551255 @"yyyy-MM-dd\THH\:mm\:sszzz" ,
12561256 @"yyyy-MM-dd\THH\:mm\:ss.fffffffzzz" ,
12571257 @"yyyy-MM-dd\THH\:mm\:ss.fffzzz" ,
1258+ @"yyyy-MM-dd\THH\:mm\:ssZ" ,
12581259 @"yyyy-MM-dd\THH:mm:ss.fffffffzzz" ,
12591260 @"yyyy-MM-dd\THH:mm:ss.fffzzz" ,
12601261 @"yyyy-MM-dd\THH:mm:sszzz" ,
1262+ @"yyyy-MM-dd\THH:mm:ss\Z" ,
12611263 } ;
12621264
12631265 public PocoJsonSerializerStrategy ( )
@@ -1364,6 +1366,8 @@ public virtual object DeserializeObject(object value, Type type)
13641366 {
13651367 if ( str . Length != 0 ) // We know it can't be null now.
13661368 {
1369+ if ( type == typeof ( NPath ) || ( ReflectionUtils . IsNullableType ( type ) && Nullable . GetUnderlyingType ( type ) == typeof ( NPath ) ) )
1370+ return new NPath ( str ) ;
13671371 if ( type == typeof ( DateTime ) || ( ReflectionUtils . IsNullableType ( type ) && Nullable . GetUnderlyingType ( type ) == typeof ( DateTime ) ) )
13681372 return DateTime . ParseExact ( str , Iso8601Format , CultureInfo . InvariantCulture , DateTimeStyles . AssumeUniversal | DateTimeStyles . AdjustToUniversal ) ;
13691373 if ( type == typeof ( DateTimeOffset ) || ( ReflectionUtils . IsNullableType ( type ) && Nullable . GetUnderlyingType ( type ) == typeof ( DateTimeOffset ) ) )
@@ -1495,7 +1499,9 @@ protected virtual object SerializeEnum(Enum p)
14951499 protected virtual bool TrySerializeKnownTypes ( object input , out object output )
14961500 {
14971501 bool returnValue = true ;
1498- if ( input is DateTime )
1502+ if ( input is NPath )
1503+ output = input . ToString ( ) ;
1504+ else if ( input is DateTime )
14991505 output = ( ( DateTime ) input ) . ToUniversalTime ( ) . ToString ( Iso8601Format [ 0 ] , CultureInfo . InvariantCulture ) ;
15001506 else if ( input is DateTimeOffset )
15011507 output = ( ( DateTimeOffset ) input ) . ToUniversalTime ( ) . ToString ( Iso8601Format [ 0 ] , CultureInfo . InvariantCulture ) ;
@@ -2158,6 +2164,8 @@ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
21582164
21592165namespace GitHub . Unity
21602166{
2167+ using GitHub . Unity . Json ;
2168+
21612169 [ System . AttributeUsage ( System . AttributeTargets . Property |
21622170 System . AttributeTargets . Field ) ]
21632171 public sealed class NotSerializedAttribute : Attribute
0 commit comments