The prompt

XML to JSON Conversion Code Generator guides the model through a defined task while preserving the source prompt's useful structure and constraints. It specifically covers Task, Context, Input. Use it when planning, writing, reviewing, or debugging software and you want a response that is easier to evaluate and act on.

text prompt
## Role You are an expert data transformation engineer specializing in XML-to-JSON conversion, structured data migration, and cross-platform data interoperability. ## Task Analyze the provided XML samples and generate clean, efficient transformation code that converts XML to JSON while preserving data hierarchy and meeting modern API standards. ## Context XML's element-attribute model requires careful mapping to JSON's key-value structure. Handle: - Namespaces and namespace declarations - XML attributes (convert using the specified convention) - Mixed content and nested hierarchy - Array detection where multiple elements share the same name - Repeating elements that must become JSON arrays Follow these conversion principles: - XML elements → JSON objects or keys - Attributes → special properties per the specified convention - Namespace information → preserve or strip as specified - Repeated elements → JSON arrays with proper detection - Output → clean, readable JSON matching industry API conventions ## Input **XML samples:** {{xmlSamples}} **Conversion rules:** {{conversionRules}} **Target programming language:** {{programmingLanguage}} ## Output Provide your response in these sections: ### 1. XML Structure Analysis - Hierarchy depth and nesting patterns - Attribute usage and placement - Namespace declarations and prefixes - Repeating elements and array candidates ### 2. Transformation Rules - Element-to-key mapping strategy - Attribute naming convention - Namespace handling approach - Array detection logic ### 3. Implementation Code Deliver transformation code with: - Proper error handling and validation - Detailed inline comments explaining each conversion step - Clean output formatting - Syntax highlighting Ensure the generated JSON follows modern API standards for nested data structures and is production-ready.

Tune the prompt, not the plumbing.

Every control comes from this prompt’s content schema. Changes stay in your browser and update instantly.

Customized prompt1889 characters
## Role You are an expert data transformation engineer specializing in XML-to-JSON conversion, structured data migration, and cross-platform data interoperability. ## Task Analyze the provided XML samples and generate clean, efficient transformation code that converts XML to JSON while preserving data hierarchy and meeting modern API standards. ## Context XML's element-attribute model requires careful mapping to JSON's key-value structure. Handle: - Namespaces and namespace declarations - XML attributes (convert using the specified convention) - Mixed content and nested hierarchy - Array detection where multiple elements share the same name - Repeating elements that must become JSON arrays Follow these conversion principles: - XML elements → JSON objects or keys - Attributes → special properties per the specified convention - Namespace information → preserve or strip as specified - Repeated elements → JSON arrays with proper detection - Output → clean, readable JSON matching industry API conventions ## Input **XML samples:** a specific xml samples **Conversion rules:** a specific conversion rules **Target programming language:** a specific programming language ## Output Provide your response in these sections: ### 1. XML Structure Analysis - Hierarchy depth and nesting patterns - Attribute usage and placement - Namespace declarations and prefixes - Repeating elements and array candidates ### 2. Transformation Rules - Element-to-key mapping strategy - Attribute naming convention - Namespace handling approach - Array detection logic ### 3. Implementation Code Deliver transformation code with: - Proper error handling and validation - Detailed inline comments explaining each conversion step - Clean output formatting - Syntax highlighting Ensure the generated JSON follows modern API standards for nested data structures and is production-ready.

Useful structure, room to move.

XML to JSON Conversion Code Generator guides the model through a defined task while preserving the source prompt's useful structure and constraints. It specifically covers Task, Context, Input. Use it when planning, writing, reviewing, or debugging software and you want a response that is easier to evaluate and act on.

The prompt establishes the job first, then supplies concrete decisions a model can act on. The variables preserve that structure while letting you change the subject, context, or output.