### Elasticsearch Version

8.6.0

### Installed Plugins

_No response_

### Java Version

_bundled_ (Elastic Cloud)

### OS Version

N/A (Elastic Cloud)

### Problem Description

The Elasticsearch's JSON Processor is not producing errors when dealing with texts that starts with integers (in general, strings that match the regular expression `/\d+(\s+.*)?/`). In these cases, instead of producing errors, the JSON Processor parses as a integer number the first number encountered. Some examples:

| INPUT  | OUTPUT |
| ------------- | ------------- |
| `"0"`    | `0` |
| `"123 foo"`  | `123`  |
| `"45 this is {\"a\": \"json\"}"`  | `45` |


### Steps to Reproduce

To reproduce the bug we can create a pipeline that only contains the JSON-Processor:

```json
PUT _ingest/pipeline/test-json
{
  "processors": [
    {
      "json": {
        "field": "message",
        "target_field": "test"
      }
    }
  ]
}
```

And simulate the result with the following body (in the table other examples are shown):

```json
GET _ingest/pipeline/test-json/_simulate
{
  "docs": [
    {
      "_source": {
        "message":"0"
      }
    }
  ]
}
```
The result is the following one:

```json
{
  "docs": [
    {
      "doc": {
        "_index": "_index",
        "_id": "_id",
        "_version": "-3",
        "_source": {
          "message": "0",
          "test": 0
        },
        "_ingest": {
          "timestamp": "2023-01-13T08:31:49.758255214Z"
        }
      }
    }
  ]
```

Note that `test` (i.e., the `target_field`) contains an integer and the JSON-Processor did not produced an error. This behavior is unexpected and can lead to documents to not be indexed because `target_field` is of type long instead of Object.



### Logs (if relevant)

_No response_
modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/JsonProcessorTests.java
jsonProcessor.execute(ingestDocument);
        assertEquals("baz", ingestDocument.getFieldValue("foo.bar", String.class));
        assertEquals("quux", ingestDocument.getFieldValue("foo.qux", String.class));
    }
    public void testAddToRootNonRecursiveMerge() throws Exception {
        String processorTag = randomAlphaOfLength(3);
        JsonProcessor jsonProcessor = new JsonProcessor(processorTag, null, "json", null, true, REPLACE, false);
        Map<String, Object> document = new HashMap<>();
        String json = """
            {"foo": {"bar": "baz"}}""";
        document.put("json", json);
        Map<String, Object> inner = new HashMap<>();
        inner.put("bar", "override_me");
        inner.put("qux", "quux");
        document.put("foo", inner);
        IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), document);
        jsonProcessor.execute(ingestDocument);
        assertEquals("baz", ingestDocument.getFieldValue("foo.bar", String.class));
        assertFalse(ingestDocument.hasField("foo.qux"));
    }
    public void testAddBoolToRoot() {
        JsonProcessor jsonProcessor = new JsonProcessor("tag", null, "field", "target_field", true, REPLACE, false);
        Map<String, Object> document = new HashMap<>();
        document.put("field", true);
        IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), document);
        Exception exception = expectThrows(IllegalArgumentException.class, () -> jsonProcessor.execute(ingestDocument));
        assertThat(exception.getMessage(), containsString("cannot add non-map fields to root of document"));
    }
}