node-json2xml icon indicating copy to clipboard operation
node-json2xml copied to clipboard

json to xml conversion with custom xml namespace

Open althaf004 opened this issue 3 years ago • 0 comments

Hi, i need to convert a json data to xml. the sample code is as below.

from json2xml import json2xml
from json2xml.utils import readfromurl, readfromstring, readfromjson
data = readfromstring(

 '{"ra:covered-product-agreement":{"login":"mojombo","id":1,"avatar_url":"https://avatars0.githubusercontent.com/u/1?v=4"}}'
)
return json2xml.Json2xml(data, attr_type=False).to_xml()

where "ra" is the namespace. but the conversion is not exactly happening.

the result expecting is

<ra:covered-product-agreement>
		<login>mojombo</login>
		<id>1</id>
		<avatar_url>https://avatars0.githubusercontent.com/u/1?v=4</avatar_url>
	</ra:covered-product-agreement>

with current version the result received is


<key name="ra:covered-product-agreement">
		<login>mojombo</login>
		<id>1</id>
		<avatar_url>https://avatars0.githubusercontent.com/u/1?v=4</avatar_url>
	</key>

Please suggest a way to achieve this using

althaf004 avatar Nov 23 '21 11:11 althaf004

If you can start the application without any errors then all libraries are there.

Please make sure you use the same baud rate on your firmware and on your UI. Without any details this is all I can tell you.

thunderbug1 avatar Jun 05 '20 12:06 thunderbug1

I've the same issue as @vuhuyhop197 Everything seems to work but when I try to send a .gcode file to my board with this Software nothing happens. It's said "sending file" with a progression bar staying at 0%

To make my Spherebot I followed the project from this website : https://www.open-electronics.org/spherebot-reloaded-customize-your-xmas/ First I tried with the firmware they gave, then with yours but result is the same.

I would be very thankful if you've any idea or solution to my problem.

Matthoxx avatar Jun 29 '20 11:06 Matthoxx

The Spherebot UI waits for the spherebot to acknowledge each line with an ok if this is not received then it won't send the next line.

You could try a serial terminal to send manual commands and see if they work. If not then something is wrong with your Arduino/Firmware/Wiring.

thunderbug1 avatar Jul 11 '20 16:07 thunderbug1