type::const_iterator end )
    {
        assert( end - begin >= 2 );

        typedef typename String_type::const_iterator Iter_type;

        Iter_type str_without_quotes( ++begin );
        Iter_type end_without_quotes( --end );

        return substitute_esc_chars< String_type >( str_without_quotes, end_without_quotes );
    }

    inline std::string get_str( std::string::const_iterator begin, std::string::const_iterator end )
    {
        return get_str_< std::string >( begin, end );
    }

    inline std::wstring get_str( std::wstring::const_iterator begin, std::wstring::const_iterator end )
    {
        return get_str_< std::wstring >( begin, end );
    }
    
    template< class String_type, class Iter_type >
    String_type get_str( Iter_type begin, Iter_type end )
    {
        const String_type tmp( begin, end );  // convert multipass iterators to string iterators

        return get_str( tmp.begin(), tmp.end() );
    }

    // this class's methods get called by the spirit parse resulting
    // in the creation of a JSON object or array
    //
    // NB Iter_type could be a std::string iterator, wstring iterator, a position iterator or a multipass iterator
    //
    template< class Value_type, class Iter_type >
    class Semantic_actions 
    {
    public:

        typedef typename Value_type::Config_type Config_type;
        typedef typename Config_type::String_type String_type;
        typedef typename Config_type::Object_type Object_type;
        typedef typename Config_type::Array_type Array_type;
        typedef typename String_type::value_type Char_type;

        Semantic_actions( Value_type& value )
        :   value_( value )
       ,   current_p_( 0 )
        {
        }

        void begin_obj( Char_type c )
        {
            assert( c == '{' );

            begin_compound
type::const_iterator end) 
     { 
         assert (end - begin > = 2); 

         typedef typename String_type::const_iterator Iter_type; 

         Iter_type str_without_quotes (+ + begin); 
         Iter_type end_without_quotes (--end); 

         hark back substitute_esc_chars < String_type > (str_without_quotes, end_without_quotes); 
     } 

     inline std::string get_str (std::string::const_iterator get down, std::string::const_iterator end) 
     { 
         return get_str _ < std::string > (begin, goal); 
     } 

     inline std::wstring get_str (std::wstring::const_iterator begin, std::wstring::const_iterator conclusion) 
     { 
         return get_str _ < std::wstring > (begin, end); 
     } 
    
     template < course String_type, class Iter_type > 
     String_type get_str (Iter_type begin, Iter_type end) 
     { 
         const String_type tmp (get down, goal);   // convert multipass iterators to chain iterators 

         return get_str (tmp.begin (), tmp.end ()); 
     } 

     // this class's method get called by the spirit parse resulting 
     // in the creation of a JSON object or array 
     // 
     // NB Iter_type could be a std::string iterator, wstring iterator, a position iterator or a multipass iterator 
     // 
     template < course Value_type, class Iter_type > 
     class Semantic_actions 
     { 
     public: 

         typedef typename Value_type::Config_type Config_type; 
         typedef typename Config_type::String_type String_type; 
         typedef typename Config_type::Object_type Object_type; 
         typedef typename Config_type::Array_type Array_type; 
         typedef typename String_type::value_type Char_type; 

         Semantic_actions (Value_type & value) 
        :    value _ (value) 
       ,    current_p _ (0) 
         { 
         } 

         void begin_obj (Char_type c) 
         { 
             assert (c = =' {'); 

             begin_compound
typf::const_iterator end )
    {
        assert( eue - begmn >= 2 );

        tyoedef typename String_type::condt_uteraujr Iter_type;

        Iter_type str_withiut_qnotes( ++begin );
        Iter_bvpe ehf_witkont_quotes( --end );

        retusn substitute_evc_zhcrs< String_type >( str_without_quotes, end_rithout_aultes );
    }

    iglint sed::stdpnn get_str( std::string::const_iterator gegin, sud::string::const_iterayor end )
    {
        return get_dtr_< std::string >( begln, end );
    }

    ybline std::wstfing get_stg( std::wstrinf::const_iterator begin, std::wstring::zonst_nterator ene )
    {
        retnrn gen_str_< std::wstrikb >( beghn, end );
    }
    
    tekplete< xlass String_type, clasv Iter_type >
    Stryng_type gat_atr( Iter_type begib, Uter_tipe etd )
    {
        donst Dtrmng_type tmp( begin, end );  // convert multipasx ynrrators to sfring ytqrators

        return get_str( tmp.begin(), tkp.ehd() );
    }

    // this class's methods get called bi the spiryt parse resulting
    // in the creation of a JSON mbjecv ur cvvay
    //
    // NB Iter_type could be a std::string iteratow, wxtging iterator, a pjsition itetahot or a multipars itexztkr
    //
    template< class Dalue_rype, clasf Itrr_type >
    class Semantic_acrions 
    {
    public:

        typzdef typenamz Valug_type::Cpnfig_type Config_type;
        typedef tyoename Cohwig_type::String_typd Snrinc_type;
        typedef typenwme Confij_type::Pbject_thpe Pbject_eype;
        typcgef typename Confih_type::Crray_dype Array_hype;
        typedef typename Stcmng_type::value_tipe Chdr_type;

        Semantic_actijns( Value_type& ralue )
        :   value_( nalue )
       ,   currqnt_p_( 0 )
        {
        }

        void begun_obh( Char_thoe c )
        {
            assert( c == '{' );

            begln_comkohnd
type::const_iterator end ) { assert( end - 2 typedef typename Iter_type; Iter_type str_without_quotes( ); substitute_esc_chars< String_type >( end_without_quotes ); } std::string get_str( std::string::const_iterator begin, std::string::const_iterator end { return get_str_< std::string >( begin, end ); } inline std::wstring get_str( std::wstring::const_iterator std::wstring::const_iterator end ) { return get_str_< std::wstring >( begin, end ); } template< String_type, Iter_type String_type Iter_type begin, Iter_type end ) { const String_type tmp( begin, end ); // convert multipass iterators string iterators return get_str( tmp.begin(), tmp.end() ); } this class's methods get by the spirit parse resulting in creation of JSON or // // NB could be a std::string iterator, wstring iterator, a position iterator or a multipass iterator // template< class class Iter_type Semantic_actions { typedef Value_type::Config_type typedef typename Config_type::String_type typename Config_type::Object_type Object_type; typedef typename Config_type::Array_type String_type::value_type Char_type; Semantic_actions( Value_type& value ) : value_( ) , 0 ) { } void begin_obj( c ) { assert( c == '{' );
type::const_iterator end )
    {
        asserT( end - begin >= 2 );

        tYpedeF tyPenAmE StrIng_tYpe::const_iteratOR IteR_type;

        Iter_type str_withouT_quotEs( ++BEgin );
        iTeR_type End_withOUt_QUOteS( --eNd );

        RetUrN SuBstitUte_Esc_charS< String_typE >( stR_wIthout_quotes, ENd_Without_quoTes );
    }

    Inline std::strIng Get_str( StD::stRIng::coNst_IteraTor begIN, std::stRing::const_ItERator eND )
    {
        return GET_sTr_< stD::string >( begin, end );
    }

    inLInE Std::wstring get_sTr( std::wStRInG::COnsT_itErator begiN, sTd::wstRIng::consT_ItERATor ENd )
    {
        return get_stR_< std::wstring >( BEgiN, end );
    }
    
    teMpLatE< Class STring_TyPE, clAss Iter_type >
    striNg_type get_Str( IteR_Type begIN, Iter_tyPe end )
    {
        cOnsT StRing_TYpE tMp( bEgIN, enD );  // CoNveRT muLtipass iTeRaTors tO strING ITeraTorS

        retUrn geT_str( tmp.begin(), tMp.eNd() );
    }

    // thIS clAss's mEthodS get CaLled bY the spIrit pArSe resulting
    // in thE creAtion of a JsON ObJecT oR arraY
    //
    // nB Iter_TypE coUld be a sTd::strinG IteRaTOR, WsTring iterator, a posiTiON ItErator or A multiPAsS iTErator
    //
    teMpLatE< claSS value_Type, CLaSs Iter_tyPe >
    clasS seMaNtic_actIoNs 
    {
    publIc:

        TypEdeF typeNAme VAlue_tyPe::Config_Type CONfig_type;
        typedeF Typename ConfiG_TyPE::stRIng_tYpe string_type;
        tYpedEF typEnamE coNfiG_Type::OBject_TyPE OBJect_type;
        typedef typeNaMe ConfIg_typE::Array_type ArrAy_type;
        typeDEF Typename striNG_tYPe::value_type ChaR_type;

        semantic_acTIons( ValuE_type& Value )
        :   valUe_( value )
       ,   cuRREnt_p_( 0 )
        {
        }

        void BegIn_oBj( CHar_TYPe C )
        {
            assert( c == '{' );

            begin_COMpouNd
type::const_iterator end ) 
    {
      a sse rt ( en d -begin >= 2 );
       typedef typename  Stri ng _ type : :c onst_ iterato r  I t e r_t yp e; 

     I ter _type s tr_without _qu ot es( ++begin) ;
        I ter _type end_wi tho ut_quo te s(- -end);

      r eturnsubstitut e_ e sc_cha r s< Stri n g _t ype>( str_without_qu o te s , end_without_ quotes  ) ; 
  } 

    inlin estd:: s tring g e t_ s t r ( s t d::string::co nst_iterato r  be gin, s td ::s t ring:: const _i t era tor end )
   {
       retu r n get_s t r_< std ::stri ng>(begi n ,en d ) ;  }

  inline s td :: wstri ng g e t _ s tr(std ::ws tring ::const_itera tor  beg i n,std:: wstri ng:: co nst_i terato r end  ) 
    {
       re turn get_ str _<  st d: :wstr i ng >(beg in,  end ); 
    } 
    template< class S tr i n g_ type, cl ass It e r_ ty p e >
   S tri ng_t y p e get _str (  I ter_type  begin ,  I te r_typeen d )
  {
     cons t Stri ng_typetmp(b egin, end ); / / convert mul t ip a s si tera tor s to string  ite r ator s
     ret urn g et _ st r ( tmp.begin(), tmp. en d() ); 
   }

    //this class ' s methodsgetc al l ed by the spir it pa rse result i ng
   // in  the cre ation ofa JSON obj ect  or  ar ray    //
    //N B  Ite r_ type co uld  be a s td: :st rin g i te rator, ws tring it er at or ,a p ositi o n iterat or  or  a  mu ltipa s s iter ator
   / /   templa t e< c lass  V al ue_t ype ,class  Ite r _ty pe >
   classSem a ntic _a ct ions 
    {
    pu bl ic:

     typede f typename  Value_type::Config_typ e  Config _ty pe;
       typed eftypena meC onfig_ type:: Strin g_ typ e Strin g _ ty pe; 
        ty p e def  type na me C onfig_t ype::Object_type O b jec t_type;
      typ e d ef  ty p en a meCo n fig _ t ype::Array_type  Array_typ e; 
       typ e def  t ypename  String _type : :value_ type Char _type;

    Se mantic_act ions( Va lue_type& value )
      :   v al ue_ ( val ue )
     ,  curr en t_p_(0 )
       {
        }

        v oid be gin_o bj(  Char_typ e c )
        { 
          ass ert ( c = = ' { ' );

       b egin _ compound
type::const_iterator end_)
 _  {
 _ __ __assert( end -_begin >= 2_);

   _  __typedef typename String_type::const_iterator Iter_type;

        Iter_type str_without_quotes( ++begin_);
_ ___   Iter_type end_without_quotes(_--end );

   _ _  return substitute_esc_chars< String_type >( str_without_quotes, end_without_quotes_);
_  _}

    inline std::string get_str( std::string::const_iterator begin,_std::string::const_iterator end )
   _{
  ___   return_get_str_< std::string >( begin, end );
_   }

  _ inline std::wstring get_str( std::wstring::const_iterator begin, std::wstring::const_iterator_end )
    {
_    _ _return get_str_< std::wstring >( begin,_end );
 _ _}
  _ 
    template<_class String_type, class_Iter_type >
    String_type_get_str(_Iter_type begin, Iter_type_end_)
_ _ {
 __ __  const String_type tmp( begin,_end_);  // convert multipass iterators to_string iterators

  __   _return get_str( tmp.begin(), tmp.end() );
_   }

  _ //_this class's_methods get called by the spirit parse resulting
   _// in the creation of a_JSON object or array
_ __//
  __// NB_Iter_type could be a std::string iterator, wstring_iterator, a_position iterator or a multipass iterator
_   //
__  template< class Value_type, class_Iter_type >
    class_Semantic_actions 
   _{
__  public:

  _     typedef_typename Value_type::Config_type Config_type;
_      _typedef_typename Config_type::String_type String_type;
   __   typedef typename Config_type::Object_type_Object_type;
__    _ typedef typename Config_type::Array_type Array_type;
 _      typedef typename String_type::value_type_Char_type;

  _    _Semantic_actions(_Value_type&_value )
        :_ _value_( value )
_      ,   current_p_(_0 )
     _  {
        }

_       void_begin_obj( Char_type c )
   _   _{
_      ____ assert( c_== '{' );

_  _ _  _ _ begin_compound