How to convert PascalCase to pascal_case?

If I had: $string = "PascalCase"; I need "pascal_case" Does PHP offer a function for this purpose?

JSON Naming Convention (snake_case, camelCase or PascalCase)

Is there a standard on JSON naming?I see most examples using all lower case separated by underscore, aka snake_case, but can it be used PascalCase or camelCase as well?

Will changing my Github username to SnakeCase break anything?

So I read https://stackoverflow.com/questions/10889436/how-to-safely-change-github-account-name But if I just change my username from stevemoser to SteveMoser that shouldn't break any of my repos...

Hibernate ImprovedNamingStrategy doesn't work

I have a database with columns naming using snakecase and entities where columns named in camelcase. The project was written using spring boot and had this configuration: @Primary @Bean ...

Where's the best place to transform snake-case api responses to javascript's camelcase properties

I have a django API which describes resources using snake_cased json. I also have a React app which consumes the API. I could map the snakecased properties in different locations, ex, in the API...

How to convert JAVA POJO class to Scala Case Class with SnakeCase

In Scala, I am trying to convert from Java POJO class to Scala Case class. Please below find the details: //Java POJO Response Class @JsonIgnoreProperties(ignoreUnknown = true) public class...

JSON.NET ANY ContractResolver causes poor performance

During performance testing of a very high throughput application we found a problem with JSON.NET's ContractResolver. Unfortunately, it appears that when you specify a ContractResolver the...

What might be best solution to get camelCase data from angular,integrate with snake_case mysql and send response in camelCase back to angular?

what i did is: $input = $request->all(); //convert the post camelcase to snakecase foreach ($input as $key => $val) { $newKey = snake_case($key); $input[$newKey] = $val; if ($newKey != $key)...

how to clone an ember object

I have a model named "user" which is like this: export default DS.Model.extend({ name: DS.attr('string'), bankAccounts: DS.attr() }) within the app, when user goes to the end page and hits...

Nifi manipulate all Json Key Values from Invokehttp

I have a json that comes from InvokeHTTP. I did a Split Json and JoltTransform to get the Key, Values, but I need to change all the Keys from Camelcase to snakecase. My Keys will be different with...

SnakeCaseNamingStrategy and JsonPatch in ASP.NET Core

Is there a way to register/use a "global" ContractResolver when using the the ApsNetCore.JsonPatch (2.1.1) package? I ran into an issue where the path was not resolved because the properties in...

ActiveAdmin Collection Names

I have an array of roles in my model: ROLES = ['super_admin', 'user', 'user_admin'] I have an ActiveAdmin form that shows these roles: input :roles, as: :check_boxes, collection: User::ROLES I...

How to live with both camelCase and snake_case

I couldn't find a good explanation on how to setup linter's or maintain a good code-quality if a module that you are heavily relying on is using camelCase and you are using snakeCase. Here is the...

Response Serialization Issue

I am facing a weird issue maybe I am doing something wrong here. So I am working on WebApi Project using .Net Core 2.2. And In that I am calling Api from another server and I am parsing the...

Python + Flask REST API, how to convert data keys between camelcase and snakecase?

I am learning Python, and coding simple REST API using Flask micro-framework. I am using SQLAlchemy for Object-relational-mapping and Marshmallow for Object-serialization/deserialization. I am...

mapping response of axios call to model

I am doing a simple axios call and getting few values. I want them to convert to a model. the problem is the server side uses different case [snakecase] and has underscores.. but in typescript...

What's the correct way to treat numbers in snake case?

If I want to write a phrase like "Column 1" in snake case (the usual C way of formatting identifiers that looks like some_function), do I insert underscore between a word or a number, like...

Can the Yii2 RESTful API return the JSON data in camelcase format?

Is it possible to configure a Yii2 RESTful API to return JSON responses in camelcase format instead of snakecase without creating the column names that way? I can't find any mention in the docs or...

Excel VBA - WorksheetFunction.CountA error - Object required

folks. I'm a programming newbie, trying to write a macro to extract some rows of data from multiple workbooks and compile them into a new workbook, then graph them. I have figured out how to...

Type declarations for function calling lodash `mapKeys`

I need a function mapping camelCase object keys to snakeCase. I want to use it multiple times with different objects. I wrote function mapKeysToSnakeCase that works well, but I wonder if there is...

How can I convert a camel case string to snake case and back in idiomatic Kotlin?

Looking for code that will do conversions like this: "MyCamelCaseA" to "my_camel_case_a" "AMultiWordString" to "a_multi_word_string" "my_camel_case_a" to "myCamelCaseA" or "MyCamelCaseA"...

SnakeCase request body ignores format

I need to configure my .NET core API to snake case, so in my startup I put: .AddNewtonsoftJson(options => { options.SerializerSettings.ReferenceLoopHandling =...

Convert camelCase to snakeCase

I have a dictionary something like this: { 'firstName': 'abc', 'lastName': 'xyz', 'favoriteMovies': ['Star Wars', 'The lone ranger'], 'favoriteCountries': [ ...

tell cucumber how to use camelCase

I am using Maven and cucumber in test automation. How can I use camelCase while writing my codes as cucumber is using snakeCase by default. Is there a way to manage it in pom.xml file in...

How to fix JsonProperty issue in springboot model class

I am trying to change the attribute name to snake_case for the response in a model class. The Jsonproperty works fine with DB entity class, but not with the model class which does not have any DB...

How to override lodash snakeCase functionality

I'm using lodash to convert text to snakeCase and I am stuck in a specific scenario where I should retain alphanumeric value as it is. When I pass string as "This is AAA456B". lodash...

From Json.NET to System.Text.Json, Replacing JsonObject(NamingStrategyType) Attribute

I'm currently replacing Json.NET with System.Text.Json and am stuck at a detail. The serialized data is used to query a web API. While most of the properties follow CamelCaseNamingPolicy, some of...

Most efficient way of transforming query result snakecase attributes to camelcase

I'm looking for the most recommended (best practice) and most efficient way of transforming my postgresql query result from snake_case to camelCase before returning it in the api JSON response...

Convert function names to snake case with clang-tidy

I have a bunch of C code whose function names are in CamelCase and I have to convert them all to snake_case. I found that there is a tool call clang-tidy that seems to be able to do this but I...

How to convert snippet placeholder from CamelCase to snake_case

I would like to create a VS Code snippet where I input a part in CamelCase, and the same string is output in snake_case at some other place in the snippet. Based on this SO post Here's my...