AzureMXChip/MXCHIPAZ3166/core/lib/netxduo/addons/azure_iot/azure-sdk-for-c/sdk/samples/iot/pnp/pnp_protocol.c
static bool json_child_token_move(az_json_reader* jr, az_span property_name)
{
  char const* const log = "Failed to process device twin message";

  while (az_result_succeeded(az_json_reader_next_token(jr)))
  {
    if ((jr->token.kind == AZ_JSON_TOKEN_PROPERTY_NAME)
        && az_json_token_is_text_equal(&jr->token, property_name))
    {
      IOT_SAMPLE_EXIT_IF_AZ_FAILED(az_json_reader_next_token(jr), log);
      return true;
    }
    else if (jr->token.kind == AZ_JSON_TOKEN_BEGIN_OBJECT)
    {
      IOT_SAMPLE_EXIT_IF_AZ_FAILED(az_json_reader_skip_children(jr), log);
    }
    else if (jr->token.kind == AZ_JSON_TOKEN_END_OBJECT)
    {
      return false;
    }
  }

  return false;
}
// Move reader to the value of property name.
Move reader to the value of property name.
Move reader to the value of property name .
static bool json_child_token_move(az_json_reader* jr, az_span property_name)
{
  char const* const log = "Failed to process device twin message";
  while (az_result_succeeded(az_json_reader_next_token(jr)))
  {
    if ((jr->token.kind == AZ_JSON_TOKEN_PROPERTY_NAME)
        && az_json_token_is_text_equal(&jr->token, property_name))
    {
      IOT_SAMPLE_EXIT_IF_AZ_FAILED(az_json_reader_next_token(jr), log);
      return true;
    }
    else if (jr->token.kind == AZ_JSON_TOKEN_BEGIN_OBJECT)
    {
      IOT_SAMPLE_EXIT_IF_AZ_FAILED(az_json_reader_skip_children(jr), log);
    }
    else if (jr->token.kind == AZ_JSON_TOKEN_END_OBJECT)
    {
      return false;
    }
  }
  return false;
}
static bool json_child_token_move ( az_json_reader * jr , az_span property_name ) { char const * const log = " " ; while ( az_result_succeeded ( az_json_reader_next_token ( jr ) ) ) { if ( ( jr -> token . kind == AZ_JSON_TOKEN_PROPERTY_NAME ) && az_json_token_is_text_equal ( & jr -> token , property_name ) ) { IOT_SAMPLE_EXIT_IF_AZ_FAILED ( az_json_reader_next_token ( jr ) , log ) ; return true ; } else if ( jr -> token . kind == AZ_JSON_TOKEN_BEGIN_OBJECT ) { IOT_SAMPLE_EXIT_IF_AZ_FAILED ( az_json_reader_skip_children ( jr ) , log ) ; } else if ( jr -> token . kind == AZ_JSON_TOKEN_END_OBJECT ) { return false ; } } return false ; }
Move reader to the value of property name.
Move reader to the value of property name .