Bird
0
0

Which of these best describes the input expected by JsonOutputParser?

easy📝 Conceptual Q2 of 15
LangChain - Output Parsers
Which of these best describes the input expected by JsonOutputParser?
AA Python dictionary
BA JSON formatted string
CA list of Python objects
DA plain text string without JSON format
Step-by-Step Solution
Solution:
  1. Step 1: Identify input type for JsonOutputParser

    JsonOutputParser expects a JSON formatted string as input to parse it into Python objects.
  2. Step 2: Exclude other input types

    It does not accept Python dicts or lists directly, nor plain text without JSON structure.
  3. Final Answer:

    A JSON formatted string -> Option B
  4. Quick Check:

    Input type = JSON string [OK]
Quick Trick: JsonOutputParser input must be a JSON string, not Python objects [OK]
Common Mistakes:
  • Passing Python dict instead of JSON string
  • Using plain text without JSON format
  • Confusing input with output type

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LangChain Quizzes