Skip to content

Circular Reference Handling #18

@krishana7911

Description

@krishana7911

Plan:

  • Use a WeakSet to track processed objects during recursion.
  • If an object appears again, replace it with a [Circular] placeholder.

Steps:

  1. Modify flattenJson to:
  • Add objects to the WeakSet before recursion.
  • Skip or replace the object if it already exists in the set.
  1. Update the jsonToMarkdown.js file.

Challenges:

  • Ensuring proper detection for objects vs. arrays.
  • Avoiding performance overhead from additional checks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestnested-jsonRelated to nested json

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions