Class: JSONRenderContext

$k. JSONRenderContext

new $k.JSONRenderContext()

Context for rendering JSON

Methods

globalContext() : Array

Get the global context

Deprecated
  • Use session() instead
    Returns:
    Type Description
    Array

    globalParameters() : Object

    Returns the global parameters.

    WARNING: This function is highly experimental

    Version:
    • Experimental feature, might be removed at any time
    Since:
    • 5.1.3
    Returns:
    Type Description
    Object

    session() : $k.Session

    Get the session

    Returns:
    Type Description
    $k.Session

    setFilters(keyFilter) : $k.JSONRenderContext

    Set filters

    Name Type Description
    keyFilter object

    Alternative 1: An array of strings defining a filter which property names to include.

    Alternative 2: An object with "include" and/or "exclude" keys

    {"exclude": ["key1", ...]}
    includes all but the listed properties, while
    {"include": ["key1", ...]}
    or
    ["key1", ...]
    includes only the listed properties.

    Non-optional properties are always included

    Alternative 3: A JSONRenderContext

    Returns:
    Type Description
    $k.JSONRenderContext

    setGlobalContext(jseGlobalContext) : $k.JSONRenderContext

    Set the global context

    Name Type Description
    jseGlobalContext Array.<object>
    Deprecated
    • Use setSession() instead
      Returns:
      Type Description
      $k.JSONRenderContext

      setLevelsOfDetail(levelsOfDetail) : $k.JSONRenderContext

      Set levels of detail, e.g. [ "propertyList", "schema" ]

      Name Type Description
      levelsOfDetail Array.<string>
      Returns:
      Type Description
      $k.JSONRenderContext

      setPreferredLocatorTypes(preferredLocatorTypes) : $k.JSONRenderContext

      Set preferred locator types, e.g. [ "propertyList", "schema" ]

      Name Type Description
      preferredLocatorTypes Array.<string>
      Returns:
      Type Description
      $k.JSONRenderContext

      setSession(session)

      Set the session

      Name Type Description
      session object

      Either a JSON object or a Session