$args{stream} ||= 0;
$args{remote} ||= 0;
$args{package} = $app;
- $args{object_hint} ||= '';
$args{server_class} = server_class();
$args{api_name} ||= $args{server_class} . '.' . $args{method};
+ unless ($args{object_hint}) {
+ ($args{object_hint} = $args{package}) =~ s/::/_/go;
+ }
+
JSON->register_class_hint( name => $args{package}, hint => $args{object_hint}, type => "hash" );
$_METHODS[$args{api_level}]{$args{api_name}} = bless \%args => $app;
OpenSRF::Utils::Config->load( config_file => $bootstrap_config_file );
- JSON->register_class_hint( name => "OpenSRF::Application", hint => "", type => "hash" );
+ JSON->register_class_hint( name => "OpenSRF::Application", hint => "method", type => "hash" );
OpenSRF::Transport->message_envelope( "OpenSRF::Transport::SlimJabber::MessageWrapper" );
OpenSRF::Transport::PeerHandle->set_peer_client( "OpenSRF::Transport::SlimJabber::PeerConnection" );