[server][HAPI JSON] Unify common code to inspect a node