@@ -160,7 +160,8 @@ public static T GetValue<T>(this STJson json, STJsonPath jsonPath) {
160160 return ( T ) value ;
161161 }
162162 }
163- return ( T ) j . Value ;
163+ return STJson . Deserialize < T > ( j ) ;
164+ //return (T)j.Value;
164165 }
165166
166167 public static T GetValue < T > ( this STJson json , string strJsonPath , T defaultValue ) {
@@ -205,7 +206,7 @@ public static bool GetValue<T>(this STJson json, STJsonPath jsonPath, T defaultV
205206 return true ;
206207 }
207208 }
208- result = ( T ) j . Value ;
209+ result = STJson . Deserialize < T > ( j ) ; // (T)j.Value;
209210 return true ;
210211 } catch {
211212 return false ;
@@ -339,9 +340,9 @@ public static STJson Select(this STJson json, string strJsonPath, STJsonPathCall
339340 return new STJsonPath ( strJsonPath ) . Select ( json , STJsonPathSelectMode . ItemOnly , callBack ) ;
340341 }
341342
342- public static STJson Select ( this STJson json , string strJsonPath , STJsonPathCallBackVoid callBack ) {
343- return new STJsonPath ( strJsonPath ) . Select ( json , STJsonPathSelectMode . ItemOnly , callBack ) ;
344- }
343+ // public static STJson Select(this STJson json, string strJsonPath, STJsonPathCallBackVoid callBack) {
344+ // return new STJsonPath(strJsonPath).Select(json, STJsonPathSelectMode.ItemOnly, callBack);
345+ // }
345346
346347 public static STJson Select ( this STJson json , string strJsonPath , STJsonPathSelectMode model ) {
347348 return new STJsonPath ( strJsonPath ) . Select ( json , model , null ) ;
@@ -351,9 +352,9 @@ public static STJson Select(this STJson json, string strJsonPath, STJsonPathSele
351352 return new STJsonPath ( strJsonPath ) . Select ( json , model , callBack ) ;
352353 }
353354
354- public static STJson Select ( this STJson json , string strJsonPath , STJsonPathSelectMode model , STJsonPathCallBackVoid callBack ) {
355- return new STJsonPath ( strJsonPath ) . Select ( json , model , callBack ) ;
356- }
355+ // public static STJson Select(this STJson json, string strJsonPath, STJsonPathSelectMode model, STJsonPathCallBackVoid callBack) {
356+ // return new STJsonPath(strJsonPath).Select(json, model, callBack);
357+ // }
357358
358359 public static STJson Select ( this STJson json , STJsonPath jsonPath ) {
359360 return jsonPath . Select ( json , STJsonPathSelectMode . ItemWithPath , null ) ;
@@ -363,9 +364,9 @@ public static STJson Select(this STJson json, STJsonPath jsonPath, STJsonPathCal
363364 return jsonPath . Select ( json , STJsonPathSelectMode . ItemOnly , callBack ) ;
364365 }
365366
366- public static STJson Select ( this STJson json , STJsonPath jsonPath , STJsonPathCallBackVoid callBack ) {
367- return jsonPath . Select ( json , STJsonPathSelectMode . ItemOnly , callBack ) ;
368- }
367+ // public static STJson Select(this STJson json, STJsonPath jsonPath, STJsonPathCallBackVoid callBack) {
368+ // return jsonPath.Select(json, STJsonPathSelectMode.ItemOnly, callBack);
369+ // }
369370
370371 public static STJson Select ( this STJson json , STJsonPath jsonPath , STJsonPathSelectMode model ) {
371372 return jsonPath . Select ( json , model , null ) ;
@@ -375,9 +376,9 @@ public static STJson Select(this STJson json, STJsonPath jsonPath, STJsonPathSel
375376 return jsonPath . Select ( json , model , callBack ) ;
376377 }
377378
378- public static STJson Select ( this STJson json , STJsonPath jsonPath , STJsonPathSelectMode model , STJsonPathCallBackVoid callBack ) {
379- return jsonPath . Select ( json , model , callBack ) ;
380- }
379+ // public static STJson Select(this STJson json, STJsonPath jsonPath, STJsonPathSelectMode model, STJsonPathCallBackVoid callBack) {
380+ // return jsonPath.Select(json, model, callBack);
381+ // }
381382
382383
383384 public static STJson SelectFirst ( this STJson json , string strJsonPath ) {
@@ -619,7 +620,7 @@ private static MergeSortInfo[] GetMergeSortInfos(STJson json, STJson jsonSort) {
619620 d_temp = item . GetValue < bool > ( ) ? 1 : 0 ;
620621 break ;
621622 case STJsonValueType . Datetime :
622- d_temp = Convert . ToDouble ( item . GetValue < DateTime > ( ) ) ;
623+ d_temp = Convert . ToDouble ( item . GetValue < DateTime > ( ) . Ticks ) ;
623624 break ;
624625 case STJsonValueType . String :
625626 d_temp = item . Value == null ? 0 : item . Value . ToString ( ) . Length ;
@@ -882,10 +883,7 @@ public static STJson Sum(this STJson json, params STJsonPath[] paths) {
882883 if ( json_item == null ) {
883884 continue ;
884885 }
885- if ( json_item . ValueType != STJsonValueType . Long ) {
886- continue ;
887- }
888- if ( json_item . ValueType != STJsonValueType . Double ) {
886+ if ( json_item . ValueType != STJsonValueType . Long && json_item . ValueType != STJsonValueType . Double ) {
889887 continue ;
890888 }
891889 lst_counter [ i ] ++ ;
0 commit comments