Skip to content
Sharp

Design patterns · interview question

You have a legacy XML-based system that needs to integrate with a new JSON-based service. Which design pattern should you use?

Multiple choiceHardchapter-13-curatedpremiumdesign-patternsproxy-and-adapter
Choose one answer
Answer and explanation

Correct answer

B. Adapter

Why

The Adapter pattern acts as a bridge between two incompatible interfaces. It allows the legacy XML system to communicate with the new JSON-based service by transforming data formats.

Test yourself on Design patterns

A free test with instant, explained results. No account needed.

Start free test
All Design patterns questions →