question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Opt-in flag to skip content of a node with no backing fields

See original GitHub issue

There is a quite frequent case when we do not need to parse the whole XML, but only meaningful parts of it. In those cases it makes no sense to describe the whole structure in code, but only those things that are actually useful.

The proposal is following: Make a global opt-in flag which will replace all field not found errors with warnings and add additional per-class annotation flag which will override global flag. It will also allow to solve #15 by automatically toggling unsafe parse for top-level node.

I can try to contribute a solution if you approve.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pdvriezecommented, Jul 15, 2019

The master branch now properly implements a handler hook for unexpected content. This hook can either throw an exception, print a warning, ignore it etc. This is set in the configuration block of the parser.

0reactions
pdvriezecommented, Jul 15, 2019

The fixed code is now in master. There are some tests that use it. One way to trigger the new approach is: Xml(myModule) { autoPolymorphism = true }.stringify(value)

You can also just have a configuration object you reuse.

Please have a look and see whether it works for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Backing Fields - EF Core - Microsoft Learn
Backing fields allow EF to read and/or write to a field rather than a property. This can be useful when encapsulation in the...
Read more >
Locking Down Node Properties for Project Copy - Oracle Help Center
The Secondary Lockdown Fields grid contains fields and properties you can lock down, including the default local node option, the segment aware option, ......
Read more >
API - esbuild
This API call is used by the command-line interface if no input files are provided and the --bundle flag is not present. In...
Read more >
TSConfig Reference - Docs on every TSConfig option
The value of extends is a string which contains a path to another configuration file to inherit from. The path may use Node.js...
Read more >
Neo4j-admin import - Operations Manual
Whether or not such nodes are skipped is controlled with --skip-duplicate-nodes flag which can have the values true or false or no value,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found