Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountListItems ¶
CountListItems counts the direct child elements of the XML root, excluding any <size> element. This is purpose-built for Jamf Classic API list endpoints like /JSSResource/policies which return:
<policies><size>2</size><policy>...</policy><policy>...</policy></policies>
func ExtractListItems ¶
ExtractListItems extracts the repeated child elements from a Classic API list XML response as a slice of maps, skipping <size>. Each child element is recursively converted to a map.
func ToJSON ¶
ToJSON converts XML bytes to JSON bytes. The root XML element becomes the top-level JSON key: <policy>...</policy> → {"policy": {...}}.
Collection elements that contain a <size> child are treated as arrays: their non-<size> children are collected into a JSON array. This matches the Jamf Classic API convention where list containers always include <size>.
Types ¶
This section is empty.