<s> """<STR_LIT>""" <EOL> from json import dumps <EOL> from . dictrender import DictRenderer <EOL> class JsonRenderer ( DictRenderer ) : <EOL> default_options = { <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : False <EOL> } <EOL> def _get_opts_kw ( self , opts ) : <EOL> result = { } <EOL> if opts . get ( '<STR_LIT>' ) : <EOL> result [ "<STR_LIT>" ] = <NUM_LIT:4> <EOL> result [ '<STR_LIT>' ] = opts . get ( '<STR_LIT>' ) <EOL> return result <EOL> def render ( self , base_node , options = None ) : <EOL> """<STR_LIT>""" <EOL> if options is None : options = { } <EOL> used_options = self . get_options ( options ) <EOL> kwargs = self . _get_opts_kw ( used_options ) <EOL> return dumps ( self . render_final ( self . render_node ( base_node , options = used_options ) , options = used_options ) , ** kwargs ) </s>
