Returns the namespace from a wrapped JsonNode
176000
public static String getNamespace(JsonNode node) {
		JsonNode nodeNs = obj(node).get(ID_NAMESPACE);
		return (nodeNs != null) ? nodeNs.asText() : null;
	}
1152995
def namespace_to_dict(obj):
    
    if isinstance(obj, (argparse.Namespace, optparse.Values)):
        return vars(obj)
    return obj
1255665
function () {
        var namespaces = [
            this._initialDefinition.$namespace,
            this._extractRelativeNamespaceFromName()
        ].filter(function (namespacePart) {
            return namespacePart;
        });
        if (namespaces.length) {
            this._namespace = namespaces.join(".");
        }
    }
454221
def namespaces(*prefixes):
    
    namespaces = {}
    for prefix in prefixes:
        namespaces[prefix] = _nsmap[prefix]
    return namespaces
41243
private Properties getNamespaces(Node node)
   {
      Properties namespaces = new Properties();
      NamedNodeMap attributes = node.getAttributes();
      for (int i = 0; i < attributes.getLength(); i++)
      {
         Attr attribute = (Attr)attributes.item(i);
         if (attribute.getName().startsWith("xmlns:"))
         {
            namespaces.setProperty(attribute.getName().substring(6), attribute.getValue());
         }
      }
      return namespaces;
   }
1317269
function getNamespace(path){
    if (hasOwnProperty.call(namespaces, path))
      return namespaces[path];

    path = path.split('.');

    var rootNs = getRootNamespace(path[0]);
    var cursor = rootNs;

    for (var i = 1; i < path.length; i++)
    {
      var name = path[i];
      var nspath = path.slice(0, i + 1).join('.');

      if (!hasOwnProperty.call(rootNs.namespaces_, nspath))
      {
        // create new namespace
        var namespace = new Namespace(nspath);

        // cursor[name] = namespace;
        if (config.implicitExt)
        {
          cursor[name] = namespace;

          /** @cut */ if (config.implicitExt == 'warn')
          /** @cut */ {
          /** @cut */   cursor[name] = namespace;
          /** @cut */   warnPropertyAccess(cursor, name, namespace,
          /** @cut */     'basis.js: Access to implicit namespace `' + nspath + '`'
          /** @cut */   );
          /** @cut */ }
        }

        rootNs.namespaces_[nspath] = namespace;
      }

      cursor = rootNs.namespaces_[nspath];
    }

    namespaces[path.join('.')] = cursor;

    return cursor;
  }
1321451
def capture_url_missing_namespace(self, node):
        
        for arg in node.args:
            if not(isinstance(arg, ast.Call) and isinstance(arg.func, ast.Name)):
                continue
            if arg.func.id != 'include':
                continue
            for keyword in arg.keywords:
                if keyword.arg == 'namespace':
                    return

            return DJ05(
                lineno=node.lineno,
                col=node.col_offset,
            )
574286
public static List<String> getNamespacedPod(String namespace, String label) throws ApiException {
    V1PodList listNamespacedPod =
        COREV1_API.listNamespacedPod(
            namespace,
            null,
            null,
            null,
            null,
            label,
            Integer.MAX_VALUE,
            null,
            TIME_OUT_VALUE,
            Boolean.FALSE);
    List<String> listPods =
        listNamespacedPod
            .getItems()
            .stream()
            .map(v1pod -> v1pod.getMetadata().getName())
            .collect(Collectors.toList());
    return listPods;
  }
812721
private String convertToString(JsonNode jsonArrayNode) {

		StringBuilder strBuilder = new StringBuilder();
		Iterator<JsonNode> nodeIterator = jsonArrayNode.iterator();
		while (nodeIterator.hasNext()) {
			JsonNode jsonNode = (JsonNode) nodeIterator.next();
			strBuilder.append(jsonNode.asText());
			if (nodeIterator.hasNext()) {
				strBuilder.append(ARRAY_VALUE_SEPARATOR);
			}
		}
		return strBuilder.toString();
	}
441322
private static JsonNode toJson(AggregatedHttpMessage res, @Nullable JsonNodeType expectedNodeType) {
        final String content = toString(res);
        final JsonNode node;
        try {
            node = Jackson.readTree(content);
        } catch (JsonParseException e) {
            throw new CentralDogmaException("failed to parse the response JSON", e);
        }

        if (expectedNodeType != null && node.getNodeType() != expectedNodeType) {
            throw new CentralDogmaException(
                    "invalid server response; expected: " + expectedNodeType +
                    ", actual: " + node.getNodeType() + ", content: " + content);
        }
        return node;
    }
380292
public static JsonNode toJson(Object obj, ClassLoader classLoader) {
        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
        if (classLoader != null) {
            Thread.currentThread().setContextClassLoader(classLoader);
        }
        try {
            if (obj == null) {
                return NullNode.instance;
            }
            ObjectMapper mapper = poolMapper.borrowObject();
            if (mapper != null) {
                try {
                    return mapper.valueToTree(obj);
                } finally {
                    poolMapper.returnObject(mapper);
                }
            }
            throw new SerializationException("No ObjectMapper instance avaialble!");
        } catch (Exception e) {
            throw e instanceof SerializationException ? (SerializationException) e
                    : new SerializationException(e);
        } finally {
            Thread.currentThread().setContextClassLoader(oldClassLoader);
        }
    }
482965
@Override // DataNodeMXBean
  public String getNamenodeAddresses() {
    final Map<String, Integer> info = new HashMap<String, Integer>();
    for (NamespaceService ns : namespaceManager.getAllNamenodeThreads()) {
      if (ns != null && ns.initialized()) {
        info.put(ns.getNNSocketAddress().getAddress().getHostAddress(), ns.getNamespaceId());
      }
    }
    return JSON.toString(info);
  }
666928
def parse_localnamespacepath(parser, event, node):
    #pylint: disable=unused-argument
    

    (next_event, next_node) = six.next(parser)

    namespaces = []

    if not _is_start(next_event, next_node, 'NAMESPACE'):
        print(next_event, next_node)
        raise ParseError('Expecting NAMESPACE')

    namespaces.append(parse_namespace(parser, next_event, next_node))

    while 1:

        (next_event, next_node) = six.next(parser)

        if _is_end(next_event, next_node, 'LOCALNAMESPACEPATH'):
            break

        if _is_start(next_event, next_node, 'NAMESPACE'):
            namespaces.append(parse_namespace(parser, next_event, next_node))
        else:
            raise ParseError('Expecting NAMESPACE')

    return '/'.join(namespaces)
695103
private static void getNamespaceBindings(Element element, Map<String, String> namespaceMap) {
    if (element == null) {
      return;
    }
    NamedNodeMap attrs = element.getAttributes();
    for (int i = 0; i < attrs.getLength(); i++) {
      Node node = attrs.item(i);
      String name = node.getNodeName();
      if ((name != null && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith(XMLConstants.XMLNS_ATTRIBUTE + ":")))) {
        namespaceMap.put(name, node.getNodeValue());
      }
    }
    Node parent = element.getParentNode();
    if (parent instanceof Element) {
      getNamespaceBindings((Element) parent, namespaceMap);
    }
  }
120225
def getNamespace(self, prefix):
        
        namespace = None
        if prefix == 'xmlns':
            namespace = DOM.findDefaultNS(prefix, self.__node)
        else:
            try:
                namespace = DOM.findNamespaceURI(prefix, self.__node)
            except DOMException, ex:
                if prefix != 'xml':
                    raise SchemaError, '%s namespace not declared for %s'\
                        %(prefix, self.__node._get_tagName())
                namespace = XMLNS.XML
        return namespace
346142
def namespace(self, prefix=None):
        
        ns = self.schema.tns
        if ns[0] is None:
            ns = (prefix, ns[1])
        return ns
504773
def epp_namespace(node, name = nil, namespaces = {})
      return namespaces['epp'] if namespaces.has_key?('epp')
      xml_namespace(node, name, 'urn:ietf:params:xml:ns:epp-1.0')
    end