Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

110
Views
Is there any way to use lower camel case style when pass object from .NET to JavaScript in CefSharp?

Lower camel case style is convention in JavaScript. Default is not lower camel case style when I pass object from .NET to JavaScript in CefSharp.

public void GetTestDataWithCallback(IJavascriptCallback callback)
{
    callback.ExecuteAsync(new TestData
                          {
                              Id = 1,
                              Name = "Johnny",
                              Test = new TestData
                                     {
                                         Id = 2,
                                         Name = "Mary"
                                     }
                          });
}

The above code will receive in JavaScript:

{"Id":1,"Name":"Johnny","Test":{"Id":2,"Name":"Mary","Test":null}}

Is there any way to use lower camel case style?

Thanks for reply.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can control naming via the JavascriptObjectRepository.NameConverter

The code look something like the following.

chromiumWebBrowser.JavascriptObjectRepository.NameConverter = new CamelCaseJavascriptNameConverter();

Make sure to set the property shortly after the ChromiumWebBrowser instance is created.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!