open-source-parsers / open-source-parsers/jsoncpp

Accessing file location from Json::Value

Open
#618 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
8.9k
Forks
2.7k
Avg merge
31m
Merged PRs (30d)
1

Description

For projects using jsoncpp to parse JSON configuration files, it would be useful to be able to obtain the actual file location (i.e. line, column) of a given JSON value. This way, it would be possible to print the line and column when reporting config validation errors, which would make such error messages more user/developer friendly.

If adding this functionality to the jsoncpp API is not desirable, is there an API to extend the parser to add such a feature?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the Json::Value API and the parser extension options mentioned in the issue. Determine whether a value can expose its source line and column, or whether the parser can be extended to retain that location, and document a clear API direction or limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.