Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for System.Collections in JsonConverter.ConvertToJson #267

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 14, 2024

  1. Add support for System.Collections in JsonConverter.ConvertToJson

    Supported collection types are Hashtable, SortedList, ArrayList, Stack, Queue.
    BitArray is not supported. Don't think it will receive much usage.
    
    Why:
    I use this library for logging data structures in VBA. It's very easy to dump nested tree/list/dictionary structures using ConvertToJson rather than writing code to iterate over each collection. Since System.Collection collections are often used in VBA, I thought this was a good idea.
    
    How:
    Use existing JSON serialization code as much as possible:
    Map Hashtable and SortedList to Dictionary
    Map ArrayList, Stack and Queue to Array.
    
    Some bugs in .Net/COM/VBA had to be hacked around. See comment on Stack and Queue types.
    sshankar-rks committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    95f5c21 View commit details
    Browse the repository at this point in the history