# [−][src]Macro mynewt::parse

    macro_rules! parse {
        (@$enc:ident @object $object:ident () () ()) => { ... };
        (@none @object $object:ident [$($key:tt)+] ($value:expr) , $($rest:tt)*) => { ... };
        (@$enc:ident @object $object:ident [$($key:tt)+] ($value:expr) , $($rest:tt)*) => { ... };
        (@$enc:ident @object $object:ident [$($key:tt)+] ($value:expr) $unexpected:tt $($rest:tt)*) => { ... };
        (@$enc:ident @object $object:ident [$($key:tt)+] ($value:expr)) => { ... };
        (@$enc:ident @object $object:ident ($($key:tt)+) (: null $($rest:tt)*) $copy:tt) => { ... };
        (@$enc:ident @object $object:ident ($($key:tt)+) (: true $($rest:tt)*) $copy:tt) => { ... };
        (@$enc:ident @object $object:ident ($($key:tt)+) (: false $($rest:tt)*) $copy:tt) => { ... };
        (@$enc:ident @object $object:ident ($($key:tt)+) (: [$($array:tt)*] $($rest:tt)*) $copy:tt) => { ... };
        (@$enc:ident @object $object:ident ($($key:tt)+) (: {$($map:tt)*} $($rest:tt)*) $copy:tt) => { ... };
        (@$enc:ident @object $object:ident ($($key:tt)+) (: $value:expr , $($rest:tt)*) $copy:tt) => { ... };
        (@$enc:ident @object $object:ident ($($key:tt)+) (: $value:expr) $copy:tt) => { ... };
        (@$enc:ident @object $object:ident ($($key:tt)+) (:) $copy:tt) => { ... };
        (@$enc:ident @object $object:ident ($($key:tt)+) () $copy:tt) => { ... };
        (@$enc:ident @object $object:ident () (: $($rest:tt)*) ($colon:tt $($copy:tt)*)) => { ... };
        (@none @object $object:ident ($($key:tt)*) (, $($rest:tt)*) ($comma:tt $($copy:tt)*)) => { ... };
        (@json @object $object:ident ($($key:tt)*) (, $($rest:tt)*) ($comma:tt $($copy:tt)*)) => { ... };
        (@cbor @object $object:ident ($($key:tt)*) (, $($rest:tt)*) ($comma:tt $($copy:tt)*)) => { ... };
        (@cbormin @object $object:ident ($($key:tt)*) (, $($rest:tt)*) ($comma:tt $($copy:tt)*)) => { ... };
        (@$enc:ident @object $object:ident () (($key:expr) : $($rest:tt)*) $copy:tt) => { ... };
        (@$enc:ident @object $object:ident ($($key:tt)*) ($tt:tt $($rest:tt)*) $copy:tt) => { ... };
        (@$enc:ident @array [$($elems:expr,)*]) => { ... };
        (@$enc:ident @array [$($elems:expr),*]) => { ... };
        (@$enc:ident @array [$($elems:expr,)*] null $($rest:tt)*) => { ... };
        (@$enc:ident @array [$($elems:expr,)*] true $($rest:tt)*) => { ... };
        (@$enc:ident @array [$($elems:expr,)*] false $($rest:tt)*) => { ... };
        (@$enc:ident @array [$($elems:expr,)*] [$($array:tt)*] $($rest:tt)*) => { ... };
        (@$enc:ident @array [$($elems:expr,)*] {$($map:tt)*} $($rest:tt)*) => { ... };
        (@$enc:ident @array [$($elems:expr,)*] $next:expr, $($rest:tt)*) => { ... };
        (@$enc:ident @array [$($elems:expr,)*] $last:expr) => { ... };
        (@$enc:ident @array [$($elems:expr),*] , $($rest:tt)*) => { ... };
        (@$enc:ident @array [$($elems:expr),*] $unexpected:tt $($rest:tt)*) => { ... };
        (@$enc:ident null) => { ... };
        (@$enc:ident true) => { ... };
        (@$enc:ident false) => { ... };
        (@$enc:ident []) => { ... };
        (@$enc:ident [ $($tt:tt)+ ]) => { ... };
        (@$enc:ident {}) => { ... };
        (@none { $($tt:tt)+ }) => { ... };
        (@json { $($tt:tt)+ }) => { ... };
        (@cbor { $($tt:tt)+ }) => { ... };
        (@cbormin { $($tt:tt)+ }) => { ... };
        (@$enc:ident $other:expr) => { ... };
    }

Parse the JSON code in the parameter and compose the CoAP payload. This macro takes these parameters:

- Encoding: `@json`, `@cbor` or `@none`
- State: Current parsing state (`@object`, `@array` or omitted)
- Context: JSON or CBOR parsing context (`JsonContext` or `CborContext`)
- Remaining tokens to be parsed
- Remaining tokens again, for error display

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)