-
Notifications
You must be signed in to change notification settings - Fork 78
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
Element is not known in this context, could not determine its type, or trying to use marshaller. #192
Comments
I've sent you a PR with the fix: There were three problems with your code:
With a few fixes I could generate the following XML: <?xml version="1.0" encoding="UTF-8"?>
<JPK xmlns="http://jpk.mf.gov.pl/wzor/2016/03/09/03095/" xmlns:ns2="http://crd.gov.pl/xml/schematy/dziedzinowe/mf/2016/01/25/eD/DefinicjeTypy/">
<Naglowek />
<Podmiot1>
<IdentyfikatorPodmiotu>
<ns2:NIP>3213213213</ns2:NIP>
<ns2:PelnaNazwa>dsadas adas Z dsadsa dsadsad</ns2:PelnaNazwa>
<ns2:REGON>32123213333</ns2:REGON>
</IdentyfikatorPodmiotu>
<AdresPodmiotu>
<ns2:KodKraju>PL</ns2:KodKraju>
</AdresPodmiotu>
</Podmiot1>
<Faktura>
<P_1>2018-01-12</P_1>
<P_2A>FV SP / 198 / 01 / 2018</P_2A>
<P_3A>rewrwer erwerw-r rew</P_3A>
<P_3B>dsfdsfgfdh dfsfds f sdfds</P_3B>
<P_3C>zzzzzz</P_3C>
<P_3D>eeeee</P_3D>
<P_4B>1232132133</P_4B>
<P_5B>1232132133</P_5B>
<P_6>2018-01-10</P_6>
<P_13_1>5316</P_13_1>
<P_14_1>1222.68</P_14_1>
<P_13_2>0</P_13_2>
<P_14_2>0</P_14_2>
<P_13_3>0</P_13_3>
<P_14_3>0</P_14_3>
<P_13_5>0</P_13_5>
<P_14_5>0</P_14_5>
<P_13_6>0</P_13_6>
<P_13_7>0</P_13_7>
<P_15>6538.68</P_15>
<P_16>false</P_16>
<P_17>false</P_17>
<P_18>false</P_18>
<P_19>false</P_19>
<P_20>false</P_20>
<P_21>false</P_21>
<P_23>false</P_23>
<P_106E_2>false</P_106E_2>
<P_106E_3>false</P_106E_3>
<RodzajFaktury>VAT</RodzajFaktury>
</Faktura>
</JPK> |
Thank You Very Much for Your Support, |
You're welcome. No, there are now built-in support for pretty-printing. Jsonix uses standard If you figure this out, please let me know. |
I used this package to pretty print XML https://www.npmjs.com/package/xml-formatter |
No, not at the moment. File a feature request if you want this. |
Ok I think it's a jsonix-schema-compiler feature so I just reported feature-request there highsource/jsonix-schema-compiler#82 |
Correct. Well done, thanks! |
Hi
I have an issue while using the marshaller. I am new to JSONIX and I would like to convert JavaScript object to XML document. I generated mapping based on
Schemat_JPK_FA(1)_v1-0.xsd
file (in the project).Could You @highsource please take a look and tell me why I get "Element [JPK] is not known in this context" error?
Here is my project
https://github.com/gitowiec/jsonix-tryout
And here is sample of XML I want to get from JSON:
The text was updated successfully, but these errors were encountered: