Skip to content

API and code cleanup #40

@hossain-khan

Description

@hossain-khan

Remove following API from JSON5 and replace with the new type safe parse() API

    /**
     * Parses a JSON5 string into a raw Kotlin object without type conversion.
     *
     * @param text JSON5 text to parse
     * @return The parsed value (Map, List, String, Number, Boolean, or null)
     * @throws JSON5Exception if the input is invalid JSON5
     */
    fun parseToAny(text: String): Any? {
        return JSON5Parser.parse(text)
    }

Update all unit test and usages to use the strongly typed JSON5 value class.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions