Thisis an early release. It has been reasonably well-tested, but it isSLOW. It can be 1000-6000x slower than the C-optimized JSON module,and is 200x slower (or more) than the pure Python JSON module.
Please Note: This library only handles JSON5 documents, it does notallow you to read arbitrary JavaScript. For example, bare integers canbe legal object keys in JavaScript, but they aren't in JSON5.
The cls keyword argument that json.load()/json.loads() acceptsto specify a custom subclass of JSONDecoder is not and will not besupported, because this implementation uses a completely differentapproach to parsing strings and doesn't have anything like theJSONDecoder class.
The cls keyword argument that json.dump()/json.dumps() acceptsis also not supported, for consistency with json5.load(). The defaultkeyword is supported, though, and might be able to serve as aworkaround.
Hi people,
some weeks ago compiling a sketch who use json5 I changed the library's current version with the oldest and had a good result.
This appears no more possible because the change is allowed, but when you recompile just the last version 6.x.x is available.
if you get a look back to the library you can see that no changes have been made.
The message that you have is that version 5 is already present, but this is not true for the compiler.
Although Benoit Blanchon says that changing from version 5 to the 6 is simple, in my experience, this is not totally true. For this reason, I wish to use the oldest version.
In the attached picture of the screen printout, you can see the end of the compiling and the message of the changes.
Someone can help me?
many thanks
Daniele
Please don't post pictures of text. That is very unhelpful. When you encounter an error you'll see a button on the right side of the orange bar in the Arduino IDE "Copy error messages". Click that button. In a message here, click the code tags button ( on the forum toolbar) and then paste the error.
Sorry,
many thanks, because
this message did me to make more focus on my libraries and I think to have solved it.
it leaves me a little disoriented, but many thanks again.
now I have to close as solved this post
How can I do it?
BR
Daniele
If you consider the issue solved, please edit your original post (the first one in the thread) and add "[solved]" to the subject line. That helps people know the issue is resolved. Also please post the solution, whether you worked it out yourself, or if someone else helped you. A note that "this was solved by doing X" is very helpful to other people with the same problem. Thanks!
Hi,
The problem has been solved making more focus on the error message, as suggested by "pert".
I saw that more library was present and unused, deleting the unnecessary files I have improved the situation.
Actually other mistakes come, but this is another problem.
I wish to thanks and make sorry with pert and the other readers if my post hasn't been totally correct.
Enjoy with Arduino.
Kindly
Daniele
Prior to DSpace 7, the DSpace XML and JSP User interfaces had different catalogs of interface messages. Unified on a single user interface, the DSpace community is transitioning to a single catalog of interfaces messages and better tools for translators.
The DSpace community is actively seeking contributors to aid in the translation of DSpace interface messages, to ensure that DSpace 7 can benefit from the most extensive localization support in the history of the project.
Please list your name, email address alongside any of the languages to which you wish to contribute. Also feel free to join the channel #translation on the DSpace Slack for assistance and discussion around DSpace 7 translations.
In order to allow automated syncing with changes in the English master catalog, and to make it clear to all translators what the original source of the message was, the English original is copied as a comment into the translated files
2. Preload your new catalog with all the messages in the en.json5 catalog by executing the sync-i18n-files.ts script, for which you can find more detailed documentation lower on this page. Assuming you are in /src/assets/i18n, you can execute:
If you have the DSpace 7 UI running locally, including the yarn tooling to start it up, there is a handy command line tool to validate your new translation. For example, to validate the Spanish file "es.json5", you can execute:
Lint is a tool we use to ensure files are correctly formatted, and have no extra characters (e.g. extra spaces at the end of each line can make the file large in size, which take longer for users to download). This simple command will check your file's syntax (run this from the root folder):
NOTE: currently, "--fix" is unable to add missing commas on the end of each line. Every new line (which is not a comment) MUST end in a comma. However, if you have a missing comma, you'll see an error like this:
Even though the community was initially very optimistic about its potential and the transition to .po and gettext, the major deal breaker was the absence of support for gettext message context (msgctxt), that would allow a translator to translate a key like "Home" into different words in the target language, depending on the context.
The initial ambitions to use the English string as the key itself, and abandon intermediate keys, was also problematic, as we hit a big number of areas in the code where keys were built up programmatically.
Because we are currently keeping message keys, there is no immediate use for identification of keys to replace with the English strings. But for future use, this might still come in handy:
Altova products have supported JSON for several years. Now, Version 2017 Release 3 of MissionKit and Server products, and MobileTogether Version 3.2 all include support for JSON5 across the product line.
The JSON data format was originally designed to be machine-written and consumed, promoting efficient communication between servers. Usage has expanded and JSON5 is a proposed extension intended to make JSON code easier for humans to write and read. JSON5 extends JSON by adding some ECMAScript 5 features and, like JSON, is a strict subset of JavaScript. Specifically, JSON5 permits inline and block comments, allows long strings to be split over several lines, and defines alternate legal syntax options for quotes and commas. These features are not permitted in standard JSON, so files containing the proposed enhancements are typically identified with the .json5 filename suffix.
MapForce supports JSON5 files as either input or output components for data mapping. When you insert a JSON5 instance into a mapping design, MapForce presents the familiar dialog shown below, offering to create a JSON5 schema automatically:
If you need to automate a high-volume of JSON5 data in a Windows, Linux, or Mac OS environment, JSON5 is also supported in FlowForce Server, with RaptorXML Server for high-performance validation and MapForce Server for data transformation.
Our blog post titled A Typical MapForce Server Use Case describes automation of a JSON workflow using Altova Server products. For the fastest performance on high-end servers, read about the MapForce Server Accelerator Edition here: MapForce Server Accelerator Edition Achieves a New Level of Data Transformation Performance.
JSON5 documents can be data sources for mobile apps created in MobileTogether. Developers can design apps that directly load or save JSON5 data with flexibility to combine an existing JSON5 data structure with other types of backend data, depending on the requirements at hand:
Sometimes a user just needs to make a quick edit or compare a JSON5 file with an earlier version. DiffDog lets users edit, compare and merge JSON5 files on local drives, on a local network, and even files on remote FTP and HTTP servers (based on user privileges) to compare, merge, and synchronize data.
Whenever I add a new feature, I also add new texts to en.json5. I can enjoy all the features of JSON5, most notably, I use comments for providing a context for translators, but I also like the possibility to use single quotes to avoid escaping of double-quotes, etc. No double quotes for keys is also a great improvement.
As a part of my build, localazy download is automatically invoked, and it downloads all translated files (including the source language; enabled by "includeSourceLang": true) to the translations folder. Localazy outputs valid JSON files for JSON5 input, so it all works with my existing JSON-based localization solution out-of-the-box, and I can manage translations comfortably through Localazy and even get a huge portion of my app translated for free with shared translations. Win-Win.
dojo/json5 is a port of the JSON5 project to AMD modules redistributed withDojo. JSON5 is a superset of JSON with expanded syntax support. The primary advantages for Dojo are support for unquotedidentifiers and single-quoted values. This enables json5.parse() to be used with Dojo templates to parse valuesthat require use of eval() in Dojo releases prior to 1.17.
Use JSON5 for your source language strings and use Localazy as a translation management platform. It's completely free for the majority of apps, it translates your app to up to 80 languages for free with shared translations, it supports JSON5, and it can output standard JSON files.
My app uses JSON for localization and I have translated files stored in the folder translations. I've added a new folders trans_source with my source JSON5 file. So the structure of my project is like this:
3a8082e126