
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
jsonfromresx
Advanced tools
JSON From Resx is a node module that converts resource files (.resx) into JavaScript objects.
From there, it's easy to save out as a JSON file for use on front-end projects.
When I converted an asp.net MVC website into a cordova application for Android/iOS, server side rendering of HTML was no longer possible.
The easiest thing to do was convert the resource files into JSON and bundle them with the app.
There weren't any up-to-date modules for this purpose at the time, so I created this module to meet that need.
This module is only designed to work as a node module.
The easiest way to install it is with:
npm install jsonfromresx --save-dev
First, require the module in your node project:
var jsonfromresx = require('jsonfromresx');
Then you can call convert to generate JavaScript objects from resource files.
convert(baseFilename, cultureFilename, options, callback)
Type: string
Required: true
Type: string
Required: false
If the cultureFilename parameter is defined, it merges the file with the baseFilename the same way that asp.net does. So if a key exists in both the base and culture resource file, the culture resource file version takes precedence.
Type: Object
Required: false
Currently, there are no special options to be specified, and null or {} can be passed.
Type: Function
Required: true
convert is async, so once it's finished it will call the callback function with the resources object as the first parameter.
jsonfromresx.convert(
'fixtures/resources.resx',
'fixtures/resources.zh-tw.resx',
{},
function (result) {
console.log(result);
}
);
Tests can be run with either npm test, nodeunit tests/ or grunt nodeunit.
Any contributions must ensure that all tests are passing and that you've added new tests for the new features.
During development, you can run grunt watch to have jshint and nodeunit run everytime you update the source code.
To report a bug simply create a new GitHub Issue and describe your problem or suggestion. All kinds of feedback are welcome, including but not limited to:
jsonfromresx is released under the MIT license.
jsonfromresx is currently maintained by Luke Howard.
I hope jsonfromresx serves its purpose for you, and I really appreciate all kinds of feedback and contributions!
FAQs
Convert resource files (.resx) into JavaScript objects.
We found that jsonfromresx demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.