message: don't fall into forever loop in zero byty in json
diff: @@ -77,6 +77,9 @@ namespace fc
  skipped = true;
  in.get();
  break;
  + case '\0':
  + FC_THROW_EXCEPTION( eof_exception, "unexpected end of file" );
  + break;
  default:
  return skipped;
  }
  @@ -136,10 +139,11 @@ namespace fc
  break;
  case '\t':
  case ' ':
  - case '\0':
  case '\n':
  in.get();
  return token.str();
  + case '\0':
  + FC_THROW_EXCEPTION( eof_exception, "unexpected end of file" );
  default:
  if( isalnum( c ) || c == '_' || c == '-' || c == '.' || c == ':' || c == '/' )
  {
  @@ -263,10 +267,9 @@ namespace fc
  try
  {
  - char c;
  - while((c = in.peek()) && !done)
  + while( !done )
  {
  -
  + char c = in.peek();
  switch( c )
  {
  case '.':
  @@ -285,6 +288,8 @@ namespace fc
  case '9':
  ss.put( in.get() );
  break;
  + case '\0':
  + FC_THROW_EXCEPTION( eof_exception, "unexpected end of file" );
  default:
  if( isalnum( c ) )
  {
  @@ -387,8 +392,9 @@ namespace fc
  {
  skip_white_space(in);
  variant var;
  - while( signed char c = in.peek() )
  + while( 1 )
  {
  + signed char c = in.peek();
  switch( c )
  {
  case ' ':
  @@ -423,7 +429,7 @@ namespace fc
  return token_from_stream( in );
  case 0x04: // ^D end of transmission
  case EOF:
  - case 0:
  + case '\0':
  FC_THROW_EXCEPTION( eof_exception, "unexpected end of file" );
  default:
  FC_THROW_EXCEPTION( parse_error_exception, "Unexpected char '${c}' in \"${s}\"",
  