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

Introduce a concept of JSON namespaces #11

Closed
3 tasks
curtisy1 opened this issue Mar 22, 2022 · 0 comments · Fixed by #17
Closed
3 tasks

Introduce a concept of JSON namespaces #11

curtisy1 opened this issue Mar 22, 2022 · 0 comments · Fixed by #17
Assignees
Labels
enhancement New feature or request

Comments

@curtisy1
Copy link
Owner

It would be great to have some kind of namespacing concept to distinguish this library from the built-in resx generator.

  • Instead of a simple key-value mapping, introduce a key-object mapping
  • Each object is a class on its own, residing in the global namespace
  • Nesting is allowed up to a certain depth of x

The following json should generate something like this, for reference:

{
	"Key": "Value",
	"AnotherKey": {
		"NestedKey": "NestedValue"
	}
}

Option 1:

namespace ABC {
	public class CBA { // default namespace. Every key-value pair goes here
		public string Key => "Value";
	}

	public class AnotherKey {
		public string NestedKey => "NestedValue";
	}
}

Option 2:

namespace ABC {
	public class CBA {
		public string Key => "Value";

	    public class AnotherKey {
		    public string NestedKey => "NestedValue";
	    }
	}
}
@curtisy1 curtisy1 added the enhancement New feature or request label Mar 22, 2022
@curtisy1 curtisy1 self-assigned this Mar 22, 2022
@curtisy1 curtisy1 mentioned this issue Mar 22, 2022
3 tasks
@curtisy1 curtisy1 linked a pull request Jan 15, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant