|
@@ -415,8 +415,22 @@ JSONValue *Parser::getValue( const char *str )
|
|
|
return new JSONArray( string );
|
|
|
if( string.getText()[ 0 ] == '{' )
|
|
|
return new JSONObject( string );
|
|
|
- if( Text( (double)string ).istGleich( string.getText() ) )
|
|
|
+ if( Text( (int)string ).istGleich( string.getText() ) )
|
|
|
return new JSONNumber( string );
|
|
|
+ if( string.anzahlVon( '.' ) )
|
|
|
+ {
|
|
|
+ Text *first = string.getTeilText( 0, string.positionVon( '.' ) );
|
|
|
+ Text *last = string.getTeilText( string.positionVon( '.' ) + 1 );
|
|
|
+ if( Text( (int)* first ).istGleich( first->getText() ) &&
|
|
|
+ Text( (int)* last ).istGleich( last->getText() ) )
|
|
|
+ {
|
|
|
+ first->release();
|
|
|
+ last->release();
|
|
|
+ return new JSONNumber( string );
|
|
|
+ }
|
|
|
+ first->release();
|
|
|
+ last->release();
|
|
|
+ }
|
|
|
return new JSONValue();
|
|
|
}
|
|
|
|