Question 790
A controller API accepts JSON but an operator writes a Python-style object using single quotes around keys. The incident evidence is: The REST controller reports malformed JSON at the first single-quoted property. Which targeted configuration or design change best addresses the failure?
- Encode the collection as a JSON array `[...]` containing one object per interface.
- Use the JSON null literal for an explicitly empty value, not the quoted string text.
- Assign a unique key or use an array for multiple hostnames instead of duplicate object property names.
- Encode valid JSON using double-quoted property names and strings.
Explanation
Correct Answer
D:The required correction is: Encode valid JSON using double-quoted property names and strings. The underlying failure mechanism is: JSON syntax requires double quotation marks for string keys and values. Verify success by carrying out this direct test: submit the payload to a JSON parser and ensure the original key/value pairs decode.
Incorrect Answers
A:Encode the collection as a JSON array `[...]` containing one object per interface would not address the need for encode valid JSON using double-quoted property names and strings.
B:Using the JSON null literal for an explicitly empty value, not the quoted string text would not address the need for encode valid JSON using double-quoted property names and strings.
C:Assigning a unique key or use an array for multiple hostnames would not address the need for encode valid JSON using double-quoted property names and strings.
Question 791
A controller API accepts JSON but an operator writes a Python-style object using single quotes around keys. The proposed remedy is: Encode valid JSON using double-quoted property names and strings. Which observation would most directly confirm that remedy works as intended?
- Parse the payload with a duplicate-key-aware validator and verify both intended records persist.
- Submit the payload to a JSON parser and ensure the original key/value pairs decode.
- Decode and verify array length and each interface field against the intended schema.
- Decode the JSON and confirm the field is null rather than a nonempty four-character string.
Explanation
Correct Answer
B:The decisive acceptance observation is: Submit the payload to a JSON parser and ensure the original key/value pairs decode. This tests the working mechanism, while the original incident was: the REST controller reports malformed JSON at the first single-quoted property.
Incorrect Answers
A:This test measures a different behavior: Parse the payload with a duplicate-key-aware validator and verify both intended records persist. It does not establish the target outcome. For the documented fault, the direct acceptance test is: submit the payload to a JSON parser and ensure the original key/value pairs decode.
C:This test measures a different behavior: Decode and verify array length and each interface field against the intended schema. It does not establish the target outcome. For the documented fault, the direct acceptance test is: submit the payload to a JSON parser and ensure the original key/value pairs decode.
D:This test measures a different behavior: Decode the JSON and confirm the field is null rather than a nonempty four-character string. It does not establish the target outcome. For the documented fault, the direct acceptance test is: submit the payload to a JSON parser and ensure the original key/value pairs decode.
Question 792
A controller API accepts JSON but an operator writes a Python-style object using single quotes around keys. During troubleshooting: The REST controller reports malformed JSON at the first single-quoted property. Which underlying cause best explains the recorded behavior?
- JSON duplicate property names are ambiguous and common decoders overwrite earlier values.
- The payload uses `{}` object syntax where list `[]` is required.
- The client serialized a string token instead of the JSON null type.
- JSON syntax requires double quotation marks for string keys and values.
Explanation
Correct Answer
D:The actual technical cause is: JSON syntax requires double quotation marks for string keys and values. It specifically explains the observation: the REST controller reports malformed JSON at the first single-quoted property. The correcting configuration is: encode valid JSON using double-quoted property names and strings.
Incorrect Answers
A:That diagnosis is supported by a different symptom: Only the last hostname value is visible after decoding the object. Here the recorded observation is: the REST controller reports malformed JSON at the first single-quoted property. The applicable cause is: jSON syntax requires double quotation marks for string keys and values.
B:That diagnosis is supported by a different symptom: The API reports expected array but received object for the `interfaces` field. Here the recorded observation is: the REST controller reports malformed JSON at the first single-quoted property. The applicable cause is: jSON syntax requires double quotation marks for string keys and values.
C:That diagnosis is supported by a different symptom: The controller stores the text null rather than treating the optional property as unset. Here the recorded observation is: the REST controller reports malformed JSON at the first single-quoted property. The applicable cause is: jSON syntax requires double quotation marks for string keys and values.
Question 793
A controller API accepts JSON but an operator writes a Python-style object using single quotes around keys. The initial change is: Encode valid JSON using double-quoted property names and strings. Which continuing control most directly prevents a recurrence of the documented problem: The REST controller reports malformed JSON at the first single-quoted property.
- Validate payload types and required fields against the controller schema before PATCH/POST.
- Use a strict linter to detect duplicate JSON object keys before controller API calls.
- Use type-aware serialization and test optional-field semantics for null and omission.
- Validate every generated payload with a standard JSON parser before sending API requests.
Explanation
Correct Answer
D:The continuing protective control is: Validate every generated payload with a standard JSON parser before sending API requests. This addresses the underlying failure mechanism: jSON syntax requires double quotation marks for string keys and values. The corresponding operational check is: submit the payload to a JSON parser and ensure the original key/value pairs decode.
Incorrect Answers
A:That control reduces a separate risk: The payload uses `{}` object syntax where list `[]` is required. For the described design, the recurring risk arises from: jSON syntax requires double quotation marks for string keys and values. The specific required safeguard is: validate every generated payload with a standard JSON parser before sending API requests.
B:That control reduces a separate risk: JSON duplicate property names are ambiguous and common decoders overwrite earlier values. For the described design, the recurring risk arises from: jSON syntax requires double quotation marks for string keys and values. The specific required safeguard is: validate every generated payload with a standard JSON parser before sending API requests.
C:That control reduces a separate risk: The client serialized a string token instead of the JSON null type. For the described design, the recurring risk arises from: jSON syntax requires double quotation marks for string keys and values. The specific required safeguard is: validate every generated payload with a standard JSON parser before sending API requests.
Question 794
A telemetry payload includes a boolean field `enabled`, and the script sends `True` as a bare JSON token. The incident evidence is: The API rejects a JSON payload containing bare capitalized `True`. Which targeted configuration or design change best addresses the failure?
- Encode the collection as a JSON array `[...]` containing one object per interface.
- Use lowercase `true` or `false` JSON literals in wire-format JSON.
- Send a JSON numeric literal 120 matching the documented field type.
- Use the JSON null literal for an explicitly empty value, not the quoted string text.
Explanation
Correct Answer
B:The required correction is: Use lowercase `true` or `false` JSON literals in wire-format JSON. The underlying failure mechanism is: Python's boolean literal syntax is not the JSON `true` literal. Verify success by carrying out this direct test: round-trip the payload through strict JSON decoding and check the boolean type.
Incorrect Answers
A:Encode the collection as a JSON array `[...]` containing one object per interface would not meet the need for lowercase `true` or `false` JSON literals in wire-format JSON.
C:Sending a JSON numeric literal 120 matching the documented field type would not meet the need for lowercase `true` or `false` JSON literals in wire-format JSON.
D:Using the JSON null literal for an explicitly empty value, not the quoted string text would not meet the need for lowercase `true` or `false` JSON literals in wire-format JSON.
Question 795
A telemetry payload includes a boolean field `enabled`, and the script sends `True` as a bare JSON token. The proposed remedy is: Use lowercase `true` or `false` JSON literals in wire-format JSON. Which observation would most directly confirm that remedy works as intended?
- Round-trip the payload through strict JSON decoding and check the boolean type.
- Decode and verify array length and each interface field against the intended schema.
- Parse the payload and confirm the VLAN value is numeric and schema validation succeeds.
- Decode the JSON and confirm the field is null rather than a nonempty four-character string.
Explanation
Correct Answer
A:The decisive acceptance observation is: Round-trip the payload through strict JSON decoding and check the boolean type. This tests the working mechanism, while the original incident was: the API rejects a JSON payload containing bare capitalized `True`.
Incorrect Answers
B:This test measures a different behavior: Decode and verify array length and each interface field against the intended schema. It does not establish the target outcome. For the documented fault, the direct acceptance test is: round-trip the payload through strict JSON decoding and check the boolean type.
C:This test measures a different behavior: Parse the payload and confirm the VLAN value is numeric and schema validation succeeds. It does not establish the target outcome. For the documented fault, the direct acceptance test is: round-trip the payload through strict JSON decoding and check the boolean type.
D:This test measures a different behavior: Decode the JSON and confirm the field is null rather than a nonempty four-character string. It does not establish the target outcome. For the documented fault, the direct acceptance test is: round-trip the payload through strict JSON decoding and check the boolean type.
Question 796
A telemetry payload includes a boolean field `enabled`, and the script sends `True` as a bare JSON token. During troubleshooting: The API rejects a JSON payload containing bare capitalized `True`. Which underlying cause best explains the recorded behavior?
- The value was encoded as a JSON string instead of an integer.
- Python's boolean literal syntax is not the JSON `true` literal.
- The client serialized a string token instead of the JSON null type.
- The payload uses `{}` object syntax where list `[]` is required.
Explanation
Correct Answer
B:The actual technical cause is: Python's boolean literal syntax is not the JSON `true` literal. It specifically explains the observation: the API rejects a JSON payload containing bare capitalized `True`. The correcting configuration is: use lowercase `true` or `false` JSON literals in wire-format JSON.
Incorrect Answers
A:That diagnosis is supported by a different symptom: The controller rejects the payload because VLAN ID is not a numeric type. Here the recorded observation is: the API rejects a JSON payload containing bare capitalized `True`. The applicable cause is: python's boolean literal syntax is not the JSON `true` literal.
C:That diagnosis is supported by a different symptom: The controller stores the text null rather than treating the optional property as unset. Here the recorded observation is: the API rejects a JSON payload containing bare capitalized `True`. The applicable cause is: python's boolean literal syntax is not the JSON `true` literal.
D:That diagnosis is supported by a different symptom: The API reports expected array but received object for the `interfaces` field. Here the recorded observation is: the API rejects a JSON payload containing bare capitalized `True`. The applicable cause is: python's boolean literal syntax is not the JSON `true` literal.
Question 797
A telemetry payload includes a boolean field `enabled`, and the script sends `True` as a bare JSON token. Select TWO complementary decisions: the direct technical remedy and a safeguard against recurrence. A verification-only step cannot substitute for either action.
- Use the JSON null literal for an explicitly empty value, not the quoted string text.
- Use lowercase `true` or `false` JSON literals in wire-format JSON.
- Send a JSON numeric literal 120 matching the documented field type.
- Serialize language-native booleans with a JSON encoder rather than manual text substitution.
- Validate payload types and required fields against the controller schema before PATCH/POST.
Explanation
Correct Answers
B:The required correction is: Use lowercase `true` or `false` JSON literals in wire-format JSON. The underlying failure mechanism is: Python's boolean literal syntax is not the JSON `true` literal. Verify success by carrying out this direct test: round-trip the payload through strict JSON decoding and check the boolean type.
D:The continuing protective control is: Serialize language-native booleans with a JSON encoder rather than manual text substitution. This addresses the underlying failure mechanism: python's boolean literal syntax is not the JSON `true` literal. The corresponding operational check is: round-trip the payload through strict JSON decoding and check the boolean type.
Incorrect Answers
A:The JSON null literal represents an empty value, not a boolean; it cannot replace an invalid `True` token for `enabled`.
C:A numeric JSON literal is the wrong data type for the boolean `enabled` field and does not fix its encoding.
E:That control reduces a separate risk: The payload uses `{}` object syntax where list `[]` is required. For the described design, the recurring risk arises from: python's boolean literal syntax is not the JSON `true` literal. The specific required safeguard is: serialize language-native booleans with a JSON encoder rather than manual text substitution.
Question 798
A configuration schema requires an array of interface dictionaries, but automation sends a single JSON object instead. The incident evidence is: The API reports expected array but received object for the `interfaces` field. Which targeted configuration or design change best addresses the failure?
- Encode the collection as a JSON array `[...]` containing one object per interface.
- Encode valid JSON using double-quoted property names and strings.
- Assign a unique key or use an array for multiple hostnames instead of duplicate object property names.
- Use lowercase `true` or `false` JSON literals in wire-format JSON.
Explanation
Correct Answer
A:The required correction is: Encode the collection as a JSON array `[...]` containing one object per interface. The underlying failure mechanism is: The payload uses `{}` object syntax where list `[]` is required. Verify success by carrying out this direct test: decode and verify array length and each interface field against the intended schema.
Incorrect Answers
B:Encode valid JSON using double-quoted property names and strings would not address the need for encode the collection as a JSON array `[...]` containing one object per interface.
C:Assigning a unique key or use an array for multiple hostnames would not address the need for encode the collection as a JSON array `[...]` containing one object per interface.
D:Using lowercase `true` or `false` JSON literals in wire-format JSON would not address the need for encode the collection as a JSON array `[...]` containing one object per interface.
Question 799
A configuration schema requires an array of interface dictionaries, but automation sends a single JSON object instead. The proposed remedy is: Encode the collection as a JSON array `[...]` containing one object per interface. Which observation would most directly confirm that remedy works as intended?
- Parse the payload with a duplicate-key-aware validator and verify both intended records persist.
- Round-trip the payload through strict JSON decoding and check the boolean type.
- Decode and verify array length and each interface field against the intended schema.
- Submit the payload to a JSON parser and ensure the original key/value pairs decode.
Explanation
Correct Answer
C:The decisive acceptance observation is: Decode and verify array length and each interface field against the intended schema. This tests the working mechanism, while the original incident was: the API reports expected array but received object for the `interfaces` field.
Incorrect Answers
A:This test measures a different behavior: Parse the payload with a duplicate-key-aware validator and verify both intended records persist. It does not establish the target outcome. For the documented fault, the direct acceptance test is: decode and verify array length and each interface field against the intended schema.
B:This test measures a different behavior: Round-trip the payload through strict JSON decoding and check the boolean type. It does not establish the target outcome. For the documented fault, the direct acceptance test is: decode and verify array length and each interface field against the intended schema.
D:This test measures a different behavior: Submit the payload to a JSON parser and ensure the original key/value pairs decode. It does not establish the target outcome. For the documented fault, the direct acceptance test is: decode and verify array length and each interface field against the intended schema.
Question 800
A configuration schema requires an array of interface dictionaries, but automation sends a single JSON object instead. During troubleshooting: The API reports expected array but received object for the `interfaces` field. Which underlying cause best explains the recorded behavior?
- Python's boolean literal syntax is not the JSON `true` literal.
- JSON duplicate property names are ambiguous and common decoders overwrite earlier values.
- The payload uses `{}` object syntax where list `[]` is required.
- JSON syntax requires double quotation marks for string keys and values.
Explanation
Correct Answer
C:The actual technical cause is: The payload uses `{}` object syntax where list `[]` is required. It specifically explains the observation: the API reports expected array but received object for the `interfaces` field. The correcting configuration is: encode the collection as a JSON array `[...]` containing one object per interface.
Incorrect Answers
A:That diagnosis is supported by a different symptom: The API rejects a JSON payload containing bare capitalized `True`. Here the recorded observation is: the API reports expected array but received object for the `interfaces` field. The applicable cause is: the payload uses `{}` object syntax where list `[]` is required.
B:That diagnosis is supported by a different symptom: Only the last hostname value is visible after decoding the object. Here the recorded observation is: the API reports expected array but received object for the `interfaces` field. The applicable cause is: the payload uses `{}` object syntax where list `[]` is required.
D:That diagnosis is supported by a different symptom: The REST controller reports malformed JSON at the first single-quoted property. Here the recorded observation is: the API reports expected array but received object for the `interfaces` field. The applicable cause is: the payload uses `{}` object syntax where list `[]` is required.
Implementing Cisco Enterprise Network Core Technologies (ENCOR) (350-401) Practice Tests