Originally posted by WTFH
View Post
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: Jison Spec
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Jison Spec"
Collapse
-
You wasted time on a troll.Originally posted by woohoo View PostLooking at the op spelling etc, i reckon I've wasted time on a troll. But reading your post has made my efforts worthwhile.
https://www.contractoruk.com/forums/...ml#post2587674
Leave a comment:
-
Looking at the op spelling etc, i reckon I've wasted time on a troll. But reading your post has made my efforts worthwhile.Originally posted by northernladuk View PostThese coding threads always give me a lazy lob on. Even better than threads with numbers in the Accounting Section, although they never end well.
Leave a comment:
-
These coding threads always give me a lazy lob on. Even better than threads with numbers in the Accounting Section, although they never end well.
Leave a comment:
-
Amizing!Originally posted by woohoo View PostIf you are using ASP.NET Core MVC and you have this in the Startup.cs then it will convert your property names to company_name. Just remove it and it should default to camel case. I don't think its the default, so you may have added it? Don't know without seeing the code what you have.
Code:services.AddMvc().AddJsonOptions(o => { o.SerializerSettings.ContractResolver = new DefaultContractResolver() { NamingStrategy = new SnakeCaseNamingStrategy() }; });
Leave a comment:
-
If you are using ASP.NET Core MVC and you have this in the Startup.cs then it will convert your property names to company_name. Just remove it and it should default to camel case. I don't think its the default, so you may have added it? Don't know without seeing the code that you have.Originally posted by The James Room View PostBisically:
public IActionResult GetCompanies()
{
return Json(this._service.GetCompanies());
}
Code:services.AddMvc().AddJsonOptions(o => { o.SerializerSettings.ContractResolver = new DefaultContractResolver() { NamingStrategy = new SnakeCaseNamingStrategy() }; });Last edited by woohoo; 26 September 2018, 06:24.
Leave a comment:
-
Bisically:Originally posted by woohoo View PostShow me the codez.
public IActionResult GetCompanies()
{
return Json(this._service.GetCompanies());
}
Leave a comment:
-
There isn't any. I wrote it.Originally posted by woohoo View PostSo I dont know why a web service would expect CompanyCode and return Company_code. I don't think there is consistent approach to json property names but I would expect the input and output to be the same.
What does the web service documentation say?
Perhaps this is the way that .net API serialises Jison.
Leave a comment:
-
So I dont know why a web service would expect CompanyCode and return Company_code. I don't think there is consistent approach to json property names but I would expect the input and output to be the same.Originally posted by The James Room View PostAny of you keyboard kids tell me why the returned JISON from a web service captilises and adds underscores to variable names?
So CompanyCode in my server code becomes companY_CODE in the JISON.
I Feel like I need a crystal ball.
What does the web service documentation say?
Leave a comment:
-
Thread moved - back in your crate, hound.Originally posted by Zigenare View PostNope, but I can recommend you post this in the "Technical" section - or suffer the consequences, you clueless twat!
Leave a comment:
-
Easy soldier - I didnt't realise there was a technical Subby.Originally posted by Zigenare View PostNope, but I can recommend you post this in the "Technical" section - or suffer the consequences, you clueless twat!
Leave a comment:
-
Nope, but I can recommend you post this in the "Technical" section - or suffer the consequences, you clueless twat!Originally posted by The James Room View PostAny of you keyboard kids tell me why the returned JISON from a web service captilises and adds underscores to variable names?
So CompanyCode in my server code becomes companY_CODE in the JISON.
I Feel like I need a crystal ball.
Leave a comment:
-
Jison Spec
Any of you keyboard kids tell me why the returned JISON from a web service captilises and adds underscores to variable names?
So CompanyCode in my server code becomes companY_CODE in the JISON.
I Feel like I need a crystal ball.Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers

Leave a comment: